Skip to Content
Xeonr Developer Docs

Resolve Token Claims

POST
/xeonr.auth.api.v1.TokenClaimsService/ResolveTokenClaims

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

Authorization

AuthorizationBearer <token>

JWT access token obtained via OAuth2 flow or service account

In: header

Header Parameters

Connect-Protocol-Version?number

Define the version of the Connect protocol

Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

token?string

The access token, exactly as the calling service received it.

Length1 <= length <= 16384
[key: string]?never

Response 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"
}