Internal use only

Use case: Identity Service When a user authenticates, Identity Service needs to get the permissions from any previously selected dynamic role. We can't call ActivateDynamicRole because it requires a token, which is being minted at the moment of this call and thus not available to the TVS. The user service would not find it. Therefore this endpoint does not depend of the TVS status. Also, no errors are produced since it would break the authentication. At most, an empty list will be returned.

POST /users/roles/dynamic/pickup

Operation id: RoleService_PickUpDynamicRoles

Tags: RoleService

Security

  • Authorization (apiKey)
    • Bearer token

Responses

200 — A successful response.

Content type: application/json

default — An unexpected error response.

Content type: application/json

Request body

Required: Yes

application/json

Schema

PropertyTypeRequiredDescription
tenantIdstringNo
userIdstringNo
rolesarrayNo
{
  "type": "object",
  "properties": {
    "tenantId": {
      "type": "string"
    },
    "userId": {
      "type": "string"
    },
    "roles": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "roleId": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          }
        }
      }
    }
  }
}

Response models

200 — A successful response.

Content type: application/json

Schema

PropertyTypeRequiredDescription
permissionAutharrayNo
{
  "type": "object",
  "properties": {
    "permissionAuth": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "permissionId": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "type": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "grants": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tenants": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "targets": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      }
    }
  }
}

default — An unexpected error response.

Content type: application/json

Schema

PropertyTypeRequiredDescription
codeinteger (int32)No
messagestringNo
detailsarrayNo
{
  "type": "object",
  "properties": {
    "code": {
      "type": "integer",
      "format": "int32"
    },
    "message": {
      "type": "string"
    },
    "details": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "@type": {
            "type": "string"
          }
        }
      }
    }
  }
}