The userinfo
API endpoint may be used to retrieve additional information about an end user beyond what is contained in the ID Token. The end user in question is given by the sub
value contained in the access token. The implementation of userinfo is according to the OpenID Connect standard.
By including the supported scopes in the Authorize request, the end user will be presented with consent dialogues dialogues (see User Experience) for the requested end user information. If consent is given, you'll be able to access the TINFO resource servers server by utilizing the Userinfo (TINFO Userinfo Endpoints) API to userinfo endpoint to get the requested end user data by using the Access token as Bearer token.
Warning |
---|
|
The consent dialogue views and the optional end user information, with the exception of Norwegian National Identity number, are considered experimental. The service can be used freely by merchants, but further development and feature request will not be prioritized going forward. We advice merchants that require information such as email, address and phone number to handle this in their own application as the user may choose to not provide this information through the BankID OIDC service. |
Overview
Anchor |
---|
| response-params |
---|
| response-params |
---|
|
Response elementsUserinfo returns signed responses in JWT format. The claims contained in the encoded JWT includes supported standard claims (see table below) along with the following additional claims:
Claim | Example | Description |
---|
iss | <tinfo-baseurl > | TINFO Resource Server |
aud | oidc-testclient | Requesting OIDC client |
Standard claims
Example
...
language | xml |
---|
title | Userinfo request |
---|
...
Response
Code Block |
---|
language | xml |
---|
title | Decoded response |
---|
|
{
"iss": "https://prototype.bankidnorge.no/tinfo-core-systemtest/",
"sub": "9578-6000-4-30799",
"aud": "oidc-testclient",
"name": "Frode Beckmann NIlsen",
"given_name": "Frode",
"family_name": "NIlsen",
"updated_at": 1519992419860,
"email": "frobnil@online.no",
"birthdate": "181266",
"phone_number": "95871775",
"address": {
"formatted": "Lybekkveien 11C\nOslo 0772",
"street_address": "Lybekkveien 11C",
"locality": "0772",
"postal_code": "Oslo"
}
} |
...