UserInfo endpoint - kmd-identity/documentation GitHub Wiki

To get information about the user from their access token, you can call the userinfo endpoint. It will return the claims present in the token but with some modifications, read more about this in the Response section. The address of the endpoint can be found here.

Requirements

To call the endpoint:

  • Use either GET or POST
  • Include the users access token in the authorization header in the format: BEARER TOKEN
  • Only use a valid token

The endpoint has CORS enabled to allow all origins, and no setup is necessary on our end for applications to start using it.

Response

The endpoint returns JSON with all the user related claims present in access token. There are two modifications to the claims:

  • A claim called unique_name is added and has the unique identifier of the user.
  • The claim sub is changed from the one in the access token to the one in the id token. Meaning it is hashed to client id of your application and unique identifier. More information about sub can be found here.