Portal access keys

A portal access key can be used to setup Single Sign On. The portal access key allows for users to be authenticated and redirected to the Basecone webportal automatically.

POST Authentication/PortalAccessKeys

If the request has no payload. The user for which the portal access key is created is identified by the authorization header.

Example response

{
    "portalAccessKey":"76e435eb-97e7-4e07-a9a4-591e6794bf6d",
    "links":
        [
            {
                "rel":"redirect","href":"https://secure.basecone.com/login?portalaccesskey=76e435eb-97e7-4e07-a9a4-591e6794bf6d"
            }
        ]
}

The response will contain a portal access key and also the url the user can be redirected to. The portal access key and therefore the link will expire in 60 seconds.

If a user identifier is specified in the payload, a portal access key for this user will be generated. This will only work if the authenticated user has role 'SuperUser'. Only super users are allowed to generate portal access keys for other users (within the same office)

Example request

{
   "UserId": "1111ee69-6780-4336-a73b-45f5b0ff0126"
}

Response will be the same as above.

Possible error responses

Status code Error code Details
400 user_not_found User was not found. Check if user exists and is active.
400 user_has_no_roles User has no roles assigned to him, user should have at least one role to be able to authenticate.
401 unauthorized Send when the authenticated user does not have role superuser and is attempting to generate portal access key for another user.