Tokens — Consent

Tokens

The consent token captures what the user granted the application: the OAuth 2.0 scopes, the claims and the attributes, based on the controls passed and the user's consents and permissions. It's issued by the controls endpoint of the Authentication API once the session is sufficient, and exchanged once at the authorization endpoint for an authorization code. See Tokens — General for how it fits in the lifecycle.

Obtaining & Using

The Login UI requests the consent token with the session token, once all controls of the application are passed:

POST /controls?client_id={client_id} HTTP/1.1Host: {tenant_id}.api.quasr.ioAuthorization: Bearer {session_token}
{    "result": "SUCCESS",    "account_id": "{account_id}",    "consent_token": "{consent_token}",    "consent_exp": 1767225900,    "consent_scope": [        "openid",        "offline_access"    ]}

It then sends the user back to the authorization endpoint, with the original authorization request and the consent token:

GET /oauth2/authorize?{original_authorization_request}&consent={consent_token} HTTP/1.1Host: {tenant_id}.api.quasr.io
  • If the consent token is invalid, already used, expired or used from another IP address, the user is redirected to the application with error=invalid_consent.
  • Native apps can also exchange the consent token directly at the token endpoint with the JWT Bearer grant (urn:ietf:params:oauth:grant-type:jwt-bearer), see Applications — Native.

Claims

Claim Description
subThe ID of the account.
client_idThe ID of the application the consent is for.
scopeThe granted scopes (scope controls), included in the access token.
issThe issuer, i.e. your tenant: https://{tenant_id}.api.quasr.io.
audThe audience: https://api.quasr.io.
iat / nbf / expWhen the token was issued, is valid from and expires (5 minutes).
jtiThe unique ID of the token.
https://api.quasr.io/claims/typThe token type: online:consent.
https://api.quasr.io/claims/clmThe granted claims (claim controls).
https://api.quasr.io/claims/atrThe IDs of the attributes to include in the identity token, from the passed controls.
https://api.quasr.io/claims/ataThe IDs of the attributes to include in the access token, from the passed controls.
https://api.quasr.io/claims/maxThe moment the earliest temporary consent expires (or 10 years from now). Tokens issued based on this consent token won't outlive it.
https://api.quasr.io/claims/useHow often the token can be used: 1 (once).
https://api.quasr.io/claims/ipbWhether the token is bound to the IP address in ipa.
https://api.quasr.io/claims/ipaThe IP address the token was issued to.
https://api.quasr.io/claims/tenThe ID of the tenant.

An example consent token:

{    "client_id": "{client_id}",    "scope": "openid offline_access",    "sub": "{account_id}",    "jti": "{token_id}",    "aud": "https://api.quasr.io",    "iss": "https://{tenant_id}.api.quasr.io",    "iat": 1767225600,    "nbf": 1767225600,    "exp": 1767225900,    "https://api.quasr.io/claims/typ": "online:consent",    "https://api.quasr.io/claims/clm": [        "email"    ],    "https://api.quasr.io/claims/atr": [        "{email_attribute_id}"    ],    "https://api.quasr.io/claims/ata": [],    "https://api.quasr.io/claims/max": 2082801600,    "https://api.quasr.io/claims/use": 1,    "https://api.quasr.io/claims/ipb": true,    "https://api.quasr.io/claims/ipa": "203.0.113.42",    "https://api.quasr.io/claims/ten": "{tenant_id}"}

Configuration

Consent tokens are configured per tenant (see Tenants — Configuration), separately for internal and external users (config.tokens.{internal|external}.consent):

  • Encryption (enc) - Whether the token is encrypted, so its content can only be read by Quasr. Enabled by default.
  • IP Binding (ipb) - Whether the token can only be used from the IP address it was issued to. Enabled by default.
  1. 1Fixed: 5 minutes, and the token can only be used once
  2. 2On by default: the consent token only works from the IP address of the login

The lifetime (5 minutes) and usage (once) of consent tokens are fixed.

Security

  • A consent token can only be used once and expires after 5 minutes, so it isn't tracked or revocable.
  • The max claim limits the lifetime of all tokens issued based on the consent, e.g. when the user gave a temporary consent.
2026.11.22 | © Copyright 2026 Quasr BV