Skip to content

Token Structure & Claims

Autentico issues three types of tokens: ID tokens, access tokens, and refresh tokens. All are JWTs.

The ID token is a JWT signed with the server’s RSA private key (RS256). It is returned in the token response alongside the access token when the openid scope is requested.

Header:

{
"alg": "RS256",
"typ": "JWT",
"kid": "autentico-key-1"
}

Payload claims:

ClaimDescription
issIssuer — the value of AUTENTICO_APP_URL + AUTENTICO_APP_OAUTH_PATH. Example: https://auth.example.com/oauth2
subSubject — the user’s unique ID
audAudience — the client_id of the requesting relying party
expExpiration timestamp (Unix)
iatIssued-at timestamp (Unix)
nonceThe nonce value from the authorization request, if provided. Used by relying parties to prevent replay attacks.

Relying parties verify the ID token signature using the public JWK Set at /.well-known/jwks.json. The kid header identifies which key to use.

The access token is a JWT used to authenticate API requests. It is passed as a Bearer token in the Authorization header.

Payload claims:

ClaimDescription
issIssuer — same as ID token
subSubject — user ID
audAudience — configured via access_token_audience setting or per-client allowed_audiences override
expExpiration timestamp
iatIssued-at timestamp
sidSession ID — correlates the token to a specific session
scopeSpace-separated scopes granted for this token

The refresh token is a JWT used to obtain new access tokens without re-authenticating the user. It is signed with the AUTENTICO_REFRESH_TOKEN_SECRET (HMAC-SHA256).

ClaimDescription
subUser ID
sidSession ID
iatIssued-at timestamp
expExpiration timestamp

Refresh tokens are opaque to relying parties — do not parse or depend on their internal structure.

Verify ID and access tokens using the public keys at:

GET /.well-known/jwks.json

Most OIDC libraries do this automatically when you point them at the discovery endpoint:

GET /.well-known/openid-configuration

For manual verification using a JWT library, the algorithm is always RS256 and the key ID is in the kid header.