Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space PDOIDC and version master

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
titleExperimental

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.

Table of Contents
maxLevel21

Overview

URLhttps://<tinfo-userinfo-baseurl>/userinfo
Request

GET without any parameters

POST is not supported

CORS is not supported

AuthenticationAccess Token as Bearer Token in Authorization Header
Response
200OKJWT containing response elements
401UnathorizedBearer token is not accepted for any reason

Error responses contains further information on the reason according to standard.

ExampleSee below

Anchor
response-params
response-params
Response elements

Userinfo 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:

ClaimExampleDescription
iss<tinfo-baseurl>TINFO Resource Server
audoidc-testclientRequesting OIDC client

Standard claims

ClaimScopeSupportConsentComment
subprofile(any)(tick) Yes
Subject Identifier. Also contained in ID Token
nameprofile(tick) Yes
Common Name from associated BankID certificate. Also contained in ID Token 
given_nameprofile(tick) Yes
First name part of the name claim. Also contained in ID Token 
familiy_nameprofile(tick) Yes
Last name (surname) part of the name claim. Also contained in ID Token 
middle_nameprofile(error) No

nicknameprofile(error) No

preferred_usernameprofile(error) No

profileprofile(error) No

pictureprofile(error) No

websiteprofile(error) No

emailemail(tick) Yes(thumbs up)(info) Consent requiredEmail is registered by end user himself for the TINFO servicethemselves via consent dialogues after authentication
email_verifiedemail(error) No

genderprofile(error) No

birthdateprofile(tick) Yes
Birthdate from associated BankID certificate. Also contained in ID Token 
zoneinfoprofile(error) No

localeprofile(error) No

phone_numberphone(tick) Yes(thumbs up)(info) Consent requiredPhone number is registered by end user himself for the TINFO serviceuser themselves via consent dialogues after authentication
phone_number_verifiedphone(error) No

addressaddress(tick) Yes(thumbs up)(info) Consent required

JSON structure with sub-elements as shown below

Address is registered by the end user himself for the TINFO servicethemselves via consent dialogues after authentication

address:formattedaddress(tick) Yes(see address)Full address string

address:street_address

address(tick) Yes(see address)Street address from
address:localityaddress(tick) Yes(see address)Norwegian "poststed"
address:regionaddress(error) No(see address)
address:postal_codeaddress(tick) Yes(see address)Norwegian "postnummer"
address:countryaddress(error) No(see address)
updated_atprofile(tick) Yes
Epoc Epoch time for latest update of any of the supported TINFO data elements
nninnnin(tick) Yes(thumbs up)Consent requiredNorwegian National Identiy Number (aka Norwegian SSN).Identity Number

Anchor
example
example
Example

...

languagexml
titleUserinfo request

...

Response

Code Block
languagexml
titleDecoded 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"
  }
}

...