Access Tokens

Access Tokens can be categorized in two classes: 

  • By-reference in terms of an arbitrary value that must be verified via Introspection to determine the Authorization Context for any particular token value.
  • Self-contained in terms JSON WebTokens (JWT) that are signed (JWS) and optionally also encrypted (JWE). Tokens of this kind contain all required information to determine the Authorization Context. Such tokens may optionally also be verified via Introspection or for augmenting the token with additional claims .

In either case, the resulting token (value) is ment for use as a standard Bearer Tokens in the request to the value-added service for which the token regulates access.

The Authorization Context of an Access Token referes to attributes such as:

  • The issuer (iss)of the access token. See corresponding claim in ID Token.
  • The subject identifier (sub) of the access token, ie. a reference to the end-user (resource owner) that authorized the access token. See corresponding claim in ID Token.
  • Intended audience (aud)for the access token, ie. a reference to the Value-Added Service (VAS) that the access token regulates access to. Note that this is not related to the corresponding claim in the ID Token. The audience for the ID Token (being the OIDC Client) is different from the audience for an Access Token (being the VAS in question). 
  • Active state / expiry (exp)of the access token
  • The specific set of scopes and claims associated with the access token, ie. the set included in the Authorize request that subsequently resulted in the issuance of the Access Token in a reponse to a Token request

The Default Acess Token in this release of the OIDC Provider from BankID has its origin from Keycloak and has the following characteristics. 

  • Self-contained token with corresponding optional support for validation via Introspect
  • Standard Bearer Tokens
  • Works with the TINFO-service and its corresponding scopes and claims.
  • Has a lifetime of 300 seconds

See the below table for a drill-down on what is actually contain in the default Access Token. As already suggested in the above list and as further elaborated in the table; the default token is used by the TINFO-service. Other VAS-services may use a similar token by using a different value for the aud attribute, or they may use Access Tokens with a completely different structure and/or content.  See the list of supported Value-added Services (VAS) for further information of Access Tokens for each such service.

The Default Acess Token contains an ID-part and and an Access-part as suggested by the table. The ID-part contains about the end-user in question. The Access-part does on the other hand contain detailed information on access grants for the various parts of the TINFO-service.

Note that the default Access Token is signed. Signing related claims contained in the header part of the Access Token are not shown in the table 

(tick) = According to standard. (info) = Custom additions

Claim Support Scope Example Description Comment
ID part
typ (tick) openid Bearer Token type Type of token
acr (tick) openid 4 Authentication Context Class Reference Level of Assurance (LoA) for IDP option being used
amr (tick) openid BID Authentication Method Reference Name of IDP option being used
(tick) openid tinfo Audience Always includes client_id
auth_time (tick) openid 1510497762 Authentication time Epoc time
azp (tick) openid oidc_testclient Authorized party Equals client_id
bankid_altsub (info) openid


Alternate Subject Identifier

Personal Identifier (PID) for BankID (Serial number from associated BankID certificate)

Applicable for BankID and other IDPs derived from BankID.

exp (tick) openid 1510498063 Expiration time Epoc time
iat (tick) openid 1510497763 Issuing time Epoc time
iss (tick) openid Issuer Identifier for the Issuer  
jti (tick) openid 7f22fd6a-3d46-4d5a-ae56-6de3c53e1873 Token identifier  
nbf (tick) openid 0 Not before time Epoc time
nonce (tick) openid <random value> Nonce  
session_state (info) openid abf823c2-9810-4133-9369-7bff1223d6c1 GUID related to session-handling in Keycloak.  
sub (tick) openid


Subject Identifier Personal Identifier from BankID
(Serial number from associated BankID certificate)
birthdate (tick) openid 1966-12-18 Birthdate BirthDate from associated BankID certificate
family_name (tick) profile Nilsen Surname (last name)  
given_name (tick) profile Frode Beckmann Given name (first name)  
name (tick) profile Nilsen, Frode Beckmann Full name CommonName from associated BankID certificate
preferred_username (tick) profile Nilsen, Frode Beckmann Shorthand name  
Access part
realms_access (info) profile nnin_altsub

Resource designator used by Keycloak.  



tinfo/address tinfo/phone

{"tinfo:{"roles ["address","phone_number", "email", "nnin"]}}
Resource designator used by Keycloak.