Token claims
The claims in Tessera's ID tokens, access tokens and userinfo answer, and what each one means.
On this page
The claims in Tessera's ID tokens, access tokens and userinfo answer, and what each one means.
Treat claims as data you may read only after you have verified the token's signature, issuer, audience and expiry. See The sign-in flow for ID tokens and Helper libraries for access tokens.
Token headers
| Token | typ |
alg |
|---|---|---|
| ID token | JWT |
EdDSA by default, or RS256 if the client is set to that. Apps created by tessera init are set to RS256, which every OIDC library supports |
| Access token | at+jwt |
EdDSA |
| Logout token | logout+jwt |
The realm key |
| Revocations feed | revocations+jwt |
The realm key |
The header always has kid. Look the key up at jwks_uri. The typ values keep one kind of token from being accepted as another.
Access token
An access token is a JWT meant for the API named in aud. Send it as Authorization: Bearer <token>. Your API should validate it itself.
| Claim | Meaning |
|---|---|
iss |
The issuer. Check it equals the realm's issuer. |
sub |
Who the token is about. A user ID for a signed-in person; the client ID for a client_credentials token; workload:<issuer-id>:<subject> for a workload. Key your records on it, not on email. |
aud |
The API this token is for: the resource you asked for, or, when a plain sign-in app asked for none, the app's own client_id. A string, or an array when you asked for several. Reject tokens that do not name you. |
exp, iat, nbf |
Expiry, issue time and not-before, in Unix seconds. The default lifetime is 15 minutes. |
jti |
A unique ID for the token. Used for revocation. |
client_id |
The client the token was issued to. |
scope |
Space-separated scopes granted. Role-granted scopes are included. |
roles |
Role keys the user holds for this audience, such as acme:member. For a plain sign-in app's own token, the roles of the apps that list the client. Left out when empty. |
permissions |
Permission strings those roles grant, such as acme:app:use. Left out when empty. See Roles and permissions. |
auth_time |
When the person last signed in (user tokens). |
sid |
The login session, as this client sees it. Matches the sid in the ID token and in back-channel logout tokens (user tokens). |
cnf |
{"jkt": "<thumbprint>"} when the token is bound to a DPoP key. The caller must then prove it holds the key. |
act |
Present when someone acts for the subject. {"sub": "...", "sub_type": "agent", "act": {...}}, with the latest actor outermost and earlier actors nested inside. See Acting for a person. |
may_act |
Who may take the next step in a delegation chain. |
principal_type |
user, workload or agent on tokens issued through the JWT-bearer grant. |
agreements |
{"version": "...", "accepted_at": 1767225600, "statements": ["..."]}, when an agreement applies to the client and the person accepted its current version. |
Access tokens do not carry the person's email or name. Call userinfo or read the ID token for those. groups is not in access tokens.
ID token
An ID token tells your app who signed in. It is for your app only. Do not send it to an API.
| Claim | Meaning |
|---|---|
iss |
The issuer. |
sub |
The user ID. Stable for the life of the account. |
aud |
Your client ID. |
exp, iat |
Expiry and issue time. Expiry matches the access token lifetime. There is no nbf. |
nonce |
The nonce you sent. Check it. Present only if you sent one. |
auth_time |
When the person signed in. |
acr |
The authentication context class reached, set by the realm's policy. You can ask for one with acr_values. |
amr |
How they signed in: pwd (password), webauthn (passkey), email_otp (emailed code), link (emailed link), otp (authenticator-app code) or ext (an upstream provider). A device-flow token carries the amr of the sign-in that approved the code. More than one when a second factor was used. |
sid |
The login session for this client. Store it to match back-channel logout. |
email, email_verified |
With scope email. |
preferred_username |
With scope profile. The part of the email before the @. |
groups |
Administrative groups only: the realm-admin scope when the user holds an active admin grant. Not your access groups; use roles and permissions. |
roles |
Role keys the user holds for this client's apps. Left out when empty. |
agreements |
As for access tokens. |
permissions is not in the ID token; it is in access tokens and userinfo.
Userinfo
GET /userinfo with an access token returns sub, email and email_verified (scope email), preferred_username (scope profile), groups, roles, permissions and agreements, with the same meanings as above. See Endpoints.
Introspection
POST /introspect (confidential clients only) returns active and, for an active token, the claims above plus username (the user's email, for the caller's own tokens), token_type, realm and principal_type. For a delegated token it adds delegation_depth, the length of the act chain.
Logout token
See Logout. Claims: iss, aud, iat, exp, jti, events, sub, sid. There is never a nonce.
Reading roles and permissions
roles and permissions are computed when the token is issued. A role change shows up at the next refresh or new sign-in, so keep access tokens short and refresh them. Permissions can be matched with wildcards, such as acme:*; match them in your own code (a * stands for any run of characters).