Get authorization details

Returns authorization details for the associated user.

POST
https://identity.krystal.io/api/v1/user/authorization

If successful, this endpoint will return a 200 OK status.

Scopes

One of the following scopes are required to use this endpoint.

Arguments

The following arguments are supported for this endpoint.

Name Type Default Value

token Required

String None

session

SessionLookup None

properties

SessionProperties None

organization

Organization Lookup None

Potential Errors

The following errors may occur during this request.

Details HTTP status

organization_not_found

No organization was found matching any of the criteria provided in the arguments

404 Not Found

properties_not_provided

The session properties were not provided but a session ID was provided

400 Bad Request

session_not_found

The session ID provided was not found

404 Not Found

Returned Object

When the request is successful, you can expect an object matching the specification below to be returned.

{
    client_id: String?
    user: User {
        id: String
        name: String
        first_name: String
        last_name: String
        time_zone: String
        two_factor_auth_enabled: Boolean
        email_address: String?
        email_addresses: [ String? ]
        roles: [ String? ]
        roles_details: [ Role? {
            name: String
            label: String
            description: String?
            require_two_factor_auth: Boolean
            organization_id: String?
        } ]
        role_permissions: [ String? ]
        identity_check_state: IdentityCheckStateEnum
        identity_check_verified_at: Unix Timestamp?
        organizations: [ OrganizationUser {
            user_id: String
            organization_id: String
            owner: Boolean
            organization_updated_at: Unix Timestamp
        } ]
    }
    expiry: Unix Timestamp?
    scopes: [ String ]
    session: SessionValidity? {
        active: Boolean
        trusted: Boolean?
        reasons_to_distrust: [ String? ]
        trusted_ip_address: Boolean?
        two_factor_auth: Boolean?
        session_created_at: Unix Timestamp?
        logged_in_at: Unix Timestamp?
    }
    user_permissions: UserPermissions {
        admin: AdminDetails {
            roles: [ Role? {
                name: String
                label: String
                description: String?
                require_two_factor_auth: Boolean
                organization_id: String?
            } ]
            permissions: [ String? ]
        }
        organizations: [ OrganizationDetails {
            id: String
            owner: Boolean
            roles: [ Role {
                name: String
                label: String
                description: String?
                require_two_factor_auth: Boolean
                organization_id: String?
            } ]
            permissions: [ String ]
        } ]
    }
    organization_owner: Boolean?
    roles: [ String ]
    roles_details: [ Role {
        name: String
        label: String
        description: String?
        require_two_factor_auth: Boolean
        organization_id: String?
    } ]
    role_permissions: [ String ]
}