ID Token
The OpenID Connect Provider from BankID provides ID Tokens with claims as shown in the below table. The origin column indicates non-standard claims. Such claims are either added by Keycloack or the result of customization made by the OIDC Provider from BankID.
The ID token structure builds on Keycloack. Three different token configurations are supported as suggested by the scope column, corresponding to three different combinations of the standard scopes openid
and profile
and the custom scope nnin_altsub.
- A Minimum ID Token (scope = openid) that contains a minimum set of claims, among which
sub
andbankid_altsub
are the only claims that are linked to the actual user. A minimum ID Token can be used by OIDC Clients that need to authenticate end-users in an anonumous way. Thesub
andbankid_altsub
values do not identify the user unless they are linked by the OIDC Client to other claims about the end user associated that identifies him more precisely. - A Regular ID Token (scope = openid profile) that builds on a minimum ID Token by adding claims that identifies the end-user by his
name
andbirthdate
. - A Enchanced ID Token (scope = ....... nnin_altsub) that builds either on a minimum ID Token or a regular ID Token by adding a claim containing the Norwegian National Identity Number of the end-user
As suggested by the IDP column many claims are present for any IDP whereas other claims are dependent on the particular IDP being used. The Eligibility column indicates if a claim is available for any OIDC client or if specific conditions apply. In the latter case eligible OIDC clients must be configured for access in the provisioning process.
Note that the TINFO value-added service supports even more claims about the end-user beyond those contained in the ID Token. The major difference is that none of the claims contained in ID Tokens demand consent from the end user. This is in contrast to claims supported by TINFO that is subject to consent handling.
Note finally that the OIDC Provider form BankID supports signed ID Tokens in JWT format. The below table shows claims in the payload part of the JWT. Claims contained in the JWT header are not shown.
Claim | Origin | Scope | Example | Eligibility | Description | Comment |
---|---|---|---|---|---|---|
Minimum ID Token part | ||||||
typ | Keycloack | openid | ID | Any | Token type | Always |
acr | Standard | openid | urn:bankid:bid;LOA=4 | Any | Authentication Context Class Reference | Uniform Resource Name for IDP option being used, including Level of Assurance (LoA) |
amr | Standard | openid | BID | Any | Authentication Method Reference | Name of IDP option being used to authenticate the end-user. If the end-user is subject to authentication step-up, note that this value may differ from any |
| Standard | openid | oidc_testclient | Any | Audience | Always client_id |
auth_time | Standard | openid | 1510497762 | Any | Authentication time | Epoc time |
azp | Standard | openid | oidc_testclient | Any | Authorized party | Equals client_id |
bankid_altsub | Custom | openid |
| Any | Alternate BankID Subject Identifier | Personal Identifier (PID) / Serial Number) from associated BankID certificate. |
originator | Custom | openid |
| Any | Issuer DName of the identity | In case of BID or BIM the issuer of the end user certificate is returned. |
exp | Standard | openid | 1510498063 | Any | Expiration time | Epoc time. Corresponds to a forward session window after iat |
iat | Standard | openid | 1510497763 | Any | Issuing time | Epoc time Equal to |
iss | Standard | openid | <oidc-baseurl> | Any | Issuer Identifier for the Issuer | |
jti | Standard | openid | 7f22fd6a-3d46-4d5a-ae56-6de3c53e1873 | Any | Token identifier | |
nbf | Standard | openid | 0 | Any | Not before time | Epoc time |
nonce | Standard | openid | <random value> | Any | Nonce | |
session_state | Keycloack | openid | abf823c2-9810-4133-9369-7bff1223d6c1 | Any | GUID related to session handling | |
sub | Standard | openid |
| Any | Subject Identifier | GUID that uniquely identifies the end user across the different IDPs |
updated_at | Standard | openid | 1468582440 | Any | Update time | Epoc time of issuing / create / enrollment of ID in question. |
at_hash | Standard | openid | <hash value> | Any | Access Token hash value | Included for hybrid- and implicit flows |
c_hash | Standard | openid | <hash value> | Any | Code hash value | Included for hybrid flow |
tid | Custom | openid | 2e1eebb7-d5d7-4c55-9410-6ab178070a1c | Any | Transaction ID (reference) for the completed authentication session | Currently used as an input parameter for the securityData endpoint of the Fraud Data (VAS) service |
| Custom | openid | { | Any | Additional information about the end user certificate. | |
Regular ID Token part | ||||||
birthdate | Standard | profile | 1966-12-18 | Any | Birthdate | From associated BankID certificate |
family_name | Standard | profile | Nilsen | Any | Surname (last name) | From associated BankID certificate |
given_name | Standard | profile | Frode Beckmann | Any | Given name (first name) | From associated BankID certificate |
name | Standard | profile | Frode Beckmann Nilsen | Any | Full name | From associated BankID certificate |
Enhanced ID Token part | ||||||
nnin_altsub | Custom | nnin_altsub | 181266***** | Available for OIDC clients that uses NNIN as userID for its already existing users. For access to NNIN for enrollment of new users, see TINFO or AML (VAS). | Norwegian National Identity Number (NNIN) as alternate Subject Identifier | Only availble with authorization code flow. |