Resolve Token Claims
Returns the teams, companies and authorization_details of an access token Auth issued, which tokens no longer carry. The token is request data; the caller authenticates as its own service account and may resolve only tokens addressed to its own application. Callers cache the teams for teams_cache_ttl_seconds and the details until the token expires; go-platform's authn/claims does this for you.
Service accounts only.
Required scopes: auth:token-claims:read
JWT access token obtained via OAuth2 flow or service account
In: header
Header Parameters
Define the version of the Connect protocol
Define the timeout, in ms
Request Body
application/json
The access token, exactly as the calling service received it.
1 <= length <= 16384Response Body
application/json
application/json
curl -X POST "https://auth.xeonr.io/xeonr.auth.api.v1.TokenClaimsService/ResolveTokenClaims" \ -H "Connect-Protocol-Version: 1" \ -H "Connect-Timeout-Ms: 1000" \ -H "Content-Type: application/json" \ -d '{}'{
"active": true,
"inactiveReason": "TOKEN_INACTIVE_REASON_UNSPECIFIED",
"subject": "string",
"teamsGranted": true,
"teamsApplicationId": "string",
"teams": [
{
"id": "string",
"slug": "string",
"role": "string",
"roles": [
"string"
],
"via": "string"
}
],
"companies": [
{
"id": "string",
"slug": "string",
"role": "string"
}
],
"teamsVersion": "string",
"authorizationDetailsJson": "string",
"authorizationDetailsCount": 0,
"teamsCacheTtlSeconds": 0,
"tokenExpiresAt": "2023-01-15T01:30:15.01Z"
}xeonr.auth.api.v1.TokenClaimsService
TokenClaimsService answers, for an access token Auth issued, what its teams, companies and authorization_details are (EP-49, AUTH-358, AUTH-413). Those lists leave every token: a service asks here instead of reading a claim, for every kind of token Auth mints. Machine-only: the calling service authenticates with its own service account's access token (authn.TokenSource, jwt-bearer, no resource indicator) holding auth:token-claims:read, and passes the token it was given as request data. It never forwards that token as its bearer, so a token narrowed to another audience, or one without auth:teams:read, resolves the same as any other. A person's token is refused in the handler even if it carries the scope (auth.machine-only-rpcs).
xeonr.auth.api.v1.UsersService
Next Page