Scopes and claims
The OIDC interface of Suomi.fi e-Identification supports scopes (set of person identification data attributes) and related claims (person identification data attributes). The requested person identification data (PID) is set in the scope parameter of the identification request, and the data is returned in the token response in the id_token parameter.
For more information, see the Identification request and response and Token request and response pages.
The use of scopes is divided into access licence levels (limited, medium, extensive). The access licence level is determined in connection with the application for the licence and checked when metadata is downloaded from the e-service.
Level | Description |
|---|---|
Limited | Basic identification data (identity, name). Included in the access rights to the e-service by default. |
Medium | More extensive personal data (address, municipality of residence, email, non-disclosure for personal safety reasons). Requires that corresponding scopes are separately permitted in the metadata of the e-service. |
Extensive | Finnish citizenship. Requires a scope that is separately permitted in the e-service metadata. |
If, in an identification request, an e-service requests a scope that is has not been permitted in the metadata of its e-service, Suomi.fi e-Identification automatically removes the scope from the token response
The openid scope is always mandatory for all identification requests in accordance with the OIDC standard. Other scopes are optional, and the e-service must only request the scopes that are necessary for the operation of the service (principle of data minimisation).
In an identification request, scopes are transmitted as a space-separated string, for example:
scope=openid names domesticaddress mail Scope | Attribute IDs | OIDC Claim Names | Käyttöluvan taso |
|---|---|---|---|
openid (mandatory) | sub, | sub, | limited |
names | givenName, | givenname, | limited |
domesticaddress | domesticAddressS, | address_fi, address_sv, postalcode, postoffice_fi, postoffice_sv | medium |
municipality | municipalityS, municipalityR, municipalityCode | municipality_fi, municipality_sv, municipalitycode | medium |
foreignaddress | foreignAddress, | foreignaddress, | medium |
protectionorder | protectionOrder | protectionorder | medium |
medium | |||
finnishcitizenship | finnishCitizenship | finnishcitizenship | Extensive |
eidas | personIdentifier (tulee openid scopen mukana), familyName, firstName, dateOfBirth, | personidentifier (tulee openid scopen mukana), familyname, firstnames, dateofbirth, | Limited |
finnishauthenticator | foreignPersonIdentifier (tulee openid scopen mukana), sn, firstName, dateOfBirth, identityAssuranceLevel | foreignpersonidentifier (tulee openid scopen mukana), surname, firstnames, dateofbirth, identityassurancelevel | Requires acceptance of separate terms of use. See the Finnish Authenticator page |
Esimerkki | Kuvaus | |
|---|---|---|
sub | JWVRUTIL36J2Y32JYMR2D | Unique identifier of the user. Always remains the same for the user when the same person ID is used (personal identity code, EidasPID, FFI identifier). In other words, one person can have three different sub-identifiers if they use all these tools. The sub value will not remain the same if the person’s personal identity code, EidasPID or FFI identifier changes. |
nationalidentification | 010280-952L | Personal identity code |
foreignpersonidentifier | SE/FI/192011189228 | EidasPID |
personidentifier | 700060931N | Finnish Authenticator identifier |
givenname | Tessa | Preferred name |
firstnames | Tessa | First names |
surname | Testilä | Surname |
fullname | Testilä Tessa | In normal situations, the content is surname + firstnames. In the event of an error in the Population Information System, the content is the name in the identification token, the format of which may vary. |
displayname | Tessa Testilä | Full name |
address_fi | Henrikintie 14 B | Address in Finnish |
address_sv | Henrikintie 14 B | Address in Swedish |
postalcode | 00370 | Postal code |
postoffice_fi | HELSINKI | City in Finnish |
postoffice_sv | HELSINGFORS | City in Swedish |
municipality_fi | Helsinki | Municipality of residence in Finnish |
municipality_sv | Helsingfors | Municipality of residence in Swedish |
municipalitycode | 091 | Municipality code |
foreignaddress | Svart katten's gatan 13 c 13, B.O.X 1010 | Permanent foreign local address, street address |
foreignaddresslocality | SE- 01230 STOCKHOLM, Ruotsi | Permanent foreign local address, locality and state in Finnish |
foreignaddresslocality | SE- 01230 STOCKHOLM, Sverige | Permanent foreign local address, locality and state in Swedish |
foreignaddresslocality | Permanent foreign local address, locality and state in easy Finnish | |
foreignaddressstatecode | 752 | Permanent foreign local address, state code |
protectionorder | 0 | Non-disclosure for personal safety reasons |
esimerkki@esimerkki.fi | ||
finnishcitizenship | 1 | Information on Finnish citizenship |
familyname | Bodén | Surname in eIDAS identification |
dateofbirth | 1920-11-18 | Date of birth. Only used in eIDAS and Finnish Authenticator identification |
identityassurancelevel | http://uid.tunnistus.fi/IAL/1 | Assurance level of Finnish Authenticator identification |
The unique user identifier is returned as a different claim depending on the identification token used:
Claim | Identification token |
|---|---|
nationalidentificationnumber | Certificate card, mobile certificate, online banking codes, Hightrust.id application |
foreignpersonidentifier | eIDAS identification. Identification token in line with the EU eIDAS regulation, used for EU nationals. |
personidentifier | Finnish Authenticator application |
Only one of these claims is returned at a time, depending on the identification token used. When an eIDAS identification method is used, an attempt is made to link (identity matching) the person to a Finnish personal identity code. If the identity matching is successful, the nationalidentificationnumber claim is returned in addition to the foreignpersonidentifier claim. The e-service must take into account all three possible claims in identification processing if the service supports several identification tokens.
The sub value is not permanent across identification tokens. The same person is assigned a different sub value depending on whether they identify themselves with a personal identity code, an eIDAS identifier or Finnish Authenticator. If the e-service needs to identify the user permanently across identification tokens, the above identity identifiers (personal identity code/eidasPID/FFI identifier) must be used and not the sub value. Changes in these identifiers (e.g. change of personal identity code) also affect the sub value.
Not all claims always contain a value even if the corresponding scope was requested. For example, foreignaddresslocalityandstate_cleartext can be empty if the data does not exist in the population information system. The e-service must process missing and empty claims appropriately (e.g. with null checks) instead of presuming that all requested claims are always present and contain data.
Name | Example | Description |
|---|---|---|
acr | http://ftn.ficora.fi/2017/loa2 | Identification level. See the Identification tokens page |
at_hash | fzWnB0vNj6HknbGBCqDMSg | The checksum of the access token. Not in use in Suomi.fi e-Identification. Normally used with, for example, the userinfo endpoint |
aud | tunnistus_testipalvelu | Specifies to which e-service the response has been addressed. Includes the unique identifier of the e-service (client_id) |
auth_time | 1777956826 | The timepoint when the user identified themselves, seconds since 1970-01-01T00:00:00Z UTC |
exp | 1777960430 | The timepoint when the validity of the JWT token ends, seconds since 1970-01-01T00:00:00Z UTC. |
iat | 1777956830 | The timepoint when the JWT was generated, seconds since 1970-01-01T00:00:00Z UTC. |
iss | https://testi.apro.tunnistus | The identifier of the JWT generator |
nonce | _kE9GJ3waR5JdGkoId77t8 | A single-use identifier that can be used to link an identification request and a token response with each other. This is done to prevent replay attacks related to reuse of the request. The e-service is responsible for verifying that the sent identifier and the received identifier match. |
sid | _933b18604ca8f3a7e5f1d5 | The identifier of the identification event (session id). This can be used in any clarifications afterwards between the e-service and Suomi.fi e-Identification. |
sub | NWLXALBJPZIPZJZTOXJT2I | Unique identifier for a person that usually remains the same for that person between different identification events. Generated with the identifier (personal identity code, Eidas PID or FFI identifier) in the identification transaction. The sub value is not the same between different identifiers, so if the same person identifies themselves with an identification token based on their personal identity code and with an eIDAS identification token, the sub value will not remain the same. The sub also changes in situations where a person’s personal identity code, Eidas PID or FFI identifier changes. |
vtjverified | true | When the value is true, the personal data has been retrieved from the population information system. When the value is false, the personal data came from the identification token. |