Skip to main content

Current-User Endpoint

The jEAP Security Starter includes an endpoint that retrieves user information and authorizations based on the provided bearer token. It returns this data in a standardized JSON format. This endpoint is primarily intended to be used by frontends to access token details without needing to parse the token in the frontend.

Content​

Here are the attributes that are returned in the response by the endpoint. Only non-empty values are returned. The only attribute that is always present is the subject.

NameCorresponding claim from token
subjectsub
namename
preferredUsernamepreferred_username
familyNamefamily_name
givenNamegiven_name
localelocale
authenticationContextClassReferenceac
authenticationMethodsReferencesamr
adminDirUidadmin_dir_uid
userExtIdext_id
userRolesuserroles
businessPartnerRolesbproles
pamsLoginLevellogin_level

The following is a complete example of a JSON response:

{
"subject": "subject",
"name": "name",
"preferredUsername": "preferredUsername",
"familyName": "familyName",
"givenName": "givenName",
"locale": "locale",
"authenticationContextClassReference": "1",
"authenticationMethodsReferences": [
"pwd",
"otp"
],
"adminDirUid": "adminDirUID",
"userExtId": "extId",
"userRoles": [
"my-user-role"
],
"businessPartnerRoles": {
"12345789": [
"jme_@thing_#read",
"jme_@partner_#read"
]
},
"pamsLoginLevel": "loginLevel"
}

Enabling and Customizing the Endpoint​

See How to: enable and customize the current-user endpoint for the steps to activate the endpoint, configure a custom path, and customize the response attributes.

Examples​