APP Authentication using CIBA

Step by step instructions for service providers on how to Authenticate using CIBA and Auðkennis APP.

Table of Contents

 

Requirements

For all steps to be successful the following must be at hand.

During setup

  • Client Id (received from Auðkenni)

  • Client secret (received from Auðkenni)

  • Related party (not necessary)

  • Base URI (received from Auðkenni)

  • Private Key (to sign a JSON Web Token)

  • Public Key (to give to Auðkenni for configuration)

Information needed at runtime

  • User’s Social Id number

  • Message text for user

  • Hash value for verification code calculation

 

Setup requirements used in the examples

  • Client id: myCibaClientId

  • Client secret: MyApiClientP4$sW

  • Base URI: pfzww.audkenni.is

  • Private Key: Not shown here for security reasons

  • Public Key: Not shown

All code examples are generated using Postman. They are therefore only for demo.

 

Step 1

Step 1: (Creating JSON Web Token)

The first step is to create a signed JWT to use for CIBA communication.

What the JWT need to include

  • login_hint (the users Social Id number)

  • scope (openid, profile, signature. Also possible to add “related party” info here (see example))

  • acr_values (“app-auth”. This value is different between authentication/signing methods)

  • iss (the Client id)

  • aud (Should have “https://pfzww.audkenni.is:443/sso/oauth2/realms/root/realms/audkenni“)

  • exp (the lifetime of the token)

  • binding_message (the message to display at users mobile device)
    Max length of this message string is 60 characters.

  • binding_content (Hash value, used to calculate verification code)

 

Optional parameters in JWT

Three optional parameters can be added to the JWT. These optional parameters makes it possible to show messages of up to 200 characters in length and/or let the App display 3 Codes user have to select the correct Verification Code from.

  • binding_message_long (Long message string to display at users mobile device. This message string can hold up to 200 characters. “confirmation_message” must also be in JWT and must be set to “true” for this message string to be used)

  • confirmation_message (If set to “true” then a prompt window is displayed at users mobile device. The user needs to confirm before continuing the process. If set to “false” the user is prompt for PIN right away)

  • vchoice (Verification code. If set to “true” three codes are displayed for user to select the correct one to continue. If set to “false” the verification code is displayed directly)

Please note, if both vchoice and confirmation_message are set to “true” the selecting of Verification code is made on the prompt window.

 

Expected behavior when using optional parameters

binding_message_long

confirmation_message

vchoice

Expected behavior

binding_message_long

confirmation_message

vchoice

Expected behavior

Not included, included empty or with a string

Not included or with “false”

Not included or with “false”

App prompts for PIN with message from “binding_message”

Not included, included empty or with a string

Not included or with “false”

Included with “true”

App prompts for selecting of Verification Code. Displays message from “binding_message”

Not included, included empty or with a string

Included with “true”

Not included or with “false”

If “binding_message_long” contains message then a prompt window appears with that message. If “binding_message_long” is empty or not included the message from “binding_message” are displayed

Not included, included empty or with a string

Included with “true”

Included with “true”

If “binding_message_long” contains message then a prompt window appears with that message along selecting of Verification Code. If “binding_message_long” is empty or not included the message from “binding_message” are displayed along selecting of Verification Code

Included with a string up to 200 characters

Not included or with “false”

Not included or with “false”

App prompts for PIN with message from “binding_message”

Included with a string up to 200 characters

Not included or with “false”

Included with “true”

App prompts for selecting of Verification Code. Displays message from “binding_message”

Included with a string up to 200 characters

Included with “true”

Not included or with “false”

App prompts for confirmation displaying message from “binding_message_long”

Included with a string up to 200 characters

Included with “true”

Included with “true”

App prompts for selecting of Verification Code. Displays message from “binding_message_long”

 

Also needed to create the JWT

  • Private key (to sign the JWT)

  • Alg info (Should be “RS256”)

The hash value

The hash string is used to generate the verification code displayed in the users APP.

You’ll need to provide the hash string to use. That’s how you can calculate the verification code at your side to display at your website for your user to see.

The hash string should be of type SHA512. Click here to search for more info about SHA512.

The verification code is calculated by:

verification code = integer(SHA256(the hash)[-2:-1]) mod 10000

Calculate SHA256 from the hash, extract 2 rightmost bytes from the result, interpret them as a big-endian unsigned integer and take the last 4 digits in decimal form for display. SHA256 is always used here.

Please mind that hash is a real hash byte value, not the Base64 form or the hexadecimal representation.

In this example we have generated a hash string and calculated a verification code.

Text used to generate a hash string

“Auðkenni APP Authentication”

Hash string generated

n/kRNhXaZ2jFKv8KlQX7ydgedXUmVy8b2O4xNq2ZxHteG7wOvCa0Kg3rY1JLOrOBXYQm+z2FRVwIv47w8gUb5g==

Verification code calculated from the hash

4141

 

Example of JWT

1 eyJ0eXAiOiJKV1QiLCscbGciOiJSUzI1NiJ9.eyJsb2dpbl9oaW50IjoiMTQwNjcxNDg4OSIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgc2lnbmF0dXJlIFJFTEFURURQQVJUdspNeU93bkNsaWVudCIsImFjcl92YWx1ZXMiOiJhcHAtYXV0aCIsImlzcyI6Im15Q2liYUNsaWVudElkIiwiYXVkIjoiaHR0cHM6Ly9wZnp3dy5hdWRrZW5uaS5pczo0NDMvc3NvL29hdXRoMi9yZWFsbXMvcm9vdC9yZWFsbXMvYXVka2VubmkiLCJleHAiOjE2skewNzYzNzYuMDg3LCJiaW5kaW5nX21lc3NhZ2UiOiJBdXRoZW50aWNhdGlvbiB0byBBdcOwa2VubmkiLCJiaW5kaW5nX2NvbnRlbnQiOiJuL2tSTmhYYVoyakZLdjhLbFFYN3lkZ2VkWFVtVnk4YjJPNHhOcTJaeEh0ZUc3d092Q2EwS2czclkxSkxPck9CUFlRsSt6MkZSVndJdjQ3dzhnVWI1Zz09In0.iwcslN5W4we832gHsB6GRF0RRiOceyE93WkIBlhhUL_yheI4xVxSWQX7hz48FfO5coOpTyLTwxzP3UVUrBScxpDhveKbCBn5GuvI8zm1330xUyU8N0WwXEIoTh5sxc-P0XDM8_BYGVUyPUHQe0JtaQntpTmPghFqdwpUPwnIVqqjOzeo3rGdgLQ7C1O-Pn_cJgZdD0mzLST5kzeSsbkD-4T02Yfzo5Qgb6BtFrsXrH9-qHq6dgOXsnQh5AdZDRqNKBBwJdyQ50L_Kp4cEyOOXFIQbuN3yqrEJvQq756xvutYUi8ugBMADAQ8IppvJv7ZtBGN4pzIqSTAIvaIjkDc6w

 

Example of JWT Payload

1 2 3 4 5 6 7 8 9 10 { "login_hint": "1406714889", "scope": "openid profile signature RELATEDPARTY:MyOwnClient", "acr_values": "app-auth", "iss": "myCibaClientId", "aud": "https://pfzww.audkenni.is:443/sso/oauth2/realms/root/realms/audkenni", "exp": 1611076236.982, "binding_message": "Authentication to Auðkenni", "binding_content": "n/kRNhXaZ2jFKv8KlQX7ydgedXUmVy8b2O4xNq2ZxHteG7wOvCa0Kg3rY1JLOrOBXYQm+z2FRVwIv47w8gUb5g==" }

 

Example of JWT Payload using optional parameters

1 2 3 4 5 6 7 8 9 10 11 12 13 { "login_hint": "1406714889", "scope": "openid profile signature RELATEDPARTY:MyOwnClient", "acr_values": "app-auth", "iss": "myCibaClientId", "aud": "https://pfzww.audkenni.is:443/sso/oauth2/realms/root/realms/audkenni", "exp": 1611076236.982, "binding_message": "", "binding_message_long": "Authentication to Auðkenni using long message string, up to 200 characters in length", "binding_content": "n/kRNhXaZ2jFKv8KlQX7ydgedXUmVy8b2O4xNq2ZxHteG7wOvCa0Kg3rY1JLOrOBXYQm+z2FRVwIv47w8gUb5g==", "confirmation_message": "true", "vchoice": "true" }

 

 

Step 2

 

Step 2: (Authorize)

To authorize using Auðkennis APP a POST call is sent to following URI:
https://pfzww.audkenni.is:443/sso/oauth2/realms/root/realms/audkenni/bc-authorize

 

Parameters needed in call

We need to add following header parameter

  • A Basic Auth header, using the Client id and Client secret

We need to add following parameter

  • request (the value should be the JWT from step 1)

 

CURL example of the call

1 2 3 4 curl --location --request POST 'https://pfzww.audkenni.is:443/sso/oauth2/realms/root/realms/audkenni/bc-authorize' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Authorization: Basic bXlDaWJhQ2xpZW50SWQ6TXlBcGlDbGllbnRQNCRzVw==' \ --data-urlencode 'request=eyJ0eXAiOiJKV1QuLCJhbGciOiJSUzI1NiJ9.eyJeb2dpbl9oaW58IjoiNjE3ODg4OCIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgc2lnbmF0dXJlIFJFTEFURURQQVJUWTpNeU93bkNsaWVudCIsImFjcl92YWx1ZXMiOiJzaW0tYXV0aCIsImlzcyI6Im15Q2liYUNsaWVudElkIiwiYXVkIjoiaHR0cHM6Ly9wZnp3dy5hdWRrZW5uaS5pczo0NDMvc3NvL29hdXRoMi9yZWFsbXMvcm9vdC9yZWFsbXMvYXVka2VubmkiLCJleHAiOjE2MTEwNzIxODQuOTkyLCJiaW5kaW5nX21lc3NhZ2UiOiJBdXRoZW50aWNhdGlvbiB0byBBdcOwa2VubmkiLCJiaW5kaW5nX2NvbnRlbnQiOiIifQ.a0NM11W2PNyfzki-gHTrQZqVhuNgL6Uh4sjQQy96lHsfD1NkVe7h-41JT9to-c710GpSvF1ExAcb7b7Bjmy6Ep0M3BVuz066fzv0YfiIHbXd6pQIEXVqUxHQ6mteW1MmaI-xsYDgG_ahXS7ZD8VrN2y1hOGUt1P4kMnVkWVpSQBjolxsZdV1HYn7n9Iy1z0gNaZb_3EIiNGLAHzI2zaDG4x0SFl-vkslf0eqfBMyEquKNFeoBqLLW7WT-PXpIaCQuJ_7ohqbx-pO_JI9Hm2Fv-VH9HoXUhsXWxig3YcQVqYBzq5aEdrE_mulCJMGeCWM02HTxpHennN5GdttlGVksg'

 

C# - RestSharp example of the call

1 2 3 4 5 6 7 8 var client = new RestClient("https://pfzww.audkenni.is:443/sso/oauth2/realms/root/realms/audkenni/bc-authorize"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/x-www-form-urlencoded"); request.AddHeader("Authorization", "Basic bXlDaWJhQ2xpZW50SWQ6TXlBcGlDbGllbnRQNCRzVw=="); request.AddParameter("request", "eyJ0eXAiOiJKV1QuLCJhbGciOiJSUzI1NiJ9.eyJeb2dpbl9oaW58IjoiNjE3ODg4OCIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgc2lnbmF0dXJlIFJFTEFURURQQVJUWTpNeU93bkNsaWVudCIsImFjcl92YWx1ZXMiOiJzaW0tYXV0aCIsImlzcyI6Im15Q2liYUNsaWVudElkIiwiYXVkIjoiaHR0cHM6Ly9wZnp3dy5hdWRrZW5uaS5pczo0NDMvc3NvL29hdXRoMi9yZWFsbXMvcm9vdC9yZWFsbXMvYXVka2VubmkiLCJleHAiOjE2MTEwNzIxODQuOTkyLCJiaW5kaW5nX21lc3NhZ2UiOiJBdXRoZW50aWNhdGlvbiB0byBBdcOwa2VubmkiLCJiaW5kaW5nX2NvbnRlbnQiOiIifQ.a0NM11W2PNyfzki-gHTrQZqVhuNgL6Uh4sjQQy96lHsfD1NkVe7h-41JT9to-c710GpSvF1ExAcb7b7Bjmy6Ep0M3BVuz066fzv0YfiIHbXd6pQIEXVqUxHQ6mteW1MmaI-xsYDgG_ahXS7ZD8VrN2y1hOGUt1P4kMnVkWVpSQBjolxsZdV1HYn7n9Iy1z0gNaZb_3EIiNGLAHzI2zaDG4x0SFl-vkslf0eqfBMyEquKNFeoBqLLW7WT-PXpIaCQuJ_7ohqbx-pO_JI9Hm2Fv-VH9HoXUhsXWxig3YcQVqYBzq5aEdrE_mulCJMGeCWM02HTxpHennN5GdttlGVksg"); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content);

 

 

Step 2: Expected response

The CIBA service answer is in JSON format.

When Step 2 is executed the authentication process at the users device starts.

The response should include following

  • auth_req_id (to use in next step)

  • expires_in (the lifetime of th id)

  • interval

 

Example of answer from Step 2

1 2 3 4 5 { "auth_req_id": "8ag4NXa4ctFJuv1h9EtUnfNeFww", "expires_in": 600, "interval": 2 }

 

 

Step 3

 

Step 3: (Poll for token)

After executing Step 2 the authentication process at the users device starts. It depends on the user, the device and the network how long time this process takes.

In this step we poll for results from the authentication process. When authentication process is finished successfully you will receive answer with Access and Id token of the user authenticated.

To poll for tokens we send another POST call to following URI:
https://pfzww.audkenni.is:443/sso/oauth2/realms/root/realms/audkenni/access_token

 

Parameters needed in call

We need to add following header parameter

  • A Basic Auth header, using the Client id and Client secret

We need to add following parameter

  • grant_type (the value should be: “urn:openid:params:grant-type:ciba”)

  • auth_req_id (the value should be the auth_req_id from last step answer)

 

CURL example of the call

1 2 3 4 5 curl --location --request POST 'https://pfzww.audkenni.is:443/sso/oauth2/realms/root/realms/audkenni/access_token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Authorization: Basic bXlDaWJhQ2xpZW50SWQ6TXlBcGlDbGllbnRQNCRzVw==' \ --data-urlencode 'grant_type=urn:openid:params:grant-type:ciba' \ --data-urlencode 'auth_req_id=byMGRumm7nantLLD7e4viiJ_ZTU'

 

C# - RestSharp example of the call

1 2 3 4 5 6 7 8 9 var client = new RestClient("https://pfzww.audkenni.is:443/sso/oauth2/realms/root/realms/audkenni/access_token"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/x-www-form-urlencoded"); request.AddHeader("Authorization", "Basic bXlDaWJhQ2xpZW50SWQ6TXlBcGlDbGllbnRQNCRzVw=="); request.AddParameter("grant_type", "urn:openid:params:grant-type:ciba"); request.AddParameter("auth_req_id", "byMGRumm7nantLLD7e4viiJ_ZTU"); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content);

 

 

Step 3: Expected response (Authentication still in process)

If you run the poll call before the user authentication process is finished you will receive a answer notifying the process isn’t finished.

The REST API service answer is in JSON format.

If you get answer like this you need to wait for short time and run Step 3 call again.

The response should include following

  • error_description

  • error

Example of answer from Step 3

1 2 3 4 { "error_description": "End user has not yet been authenticated", "error": "authorization_pending" }

 

Step 3: Expected response (Authentication is finished)

The answer from this call should give you the Access and Id tokens along type and lifetime.

The Id token contains a PKCS1 signature and a authentication certificate.

The REST API service answer is in JSON format.

Best practice

Best practice is to verify the signature and the certificate. Verify the user’s info in the Id token against the certificate and the social Id number entered by the user in beginning (login_hint). By decoding the signature using the certificate you should end up with the hash from the earlier step.

The response should include following

  • access_token

  • scope

  • id_token

  • token_type

  • expires_in (lifetime of the tokens)

Example of answer from step 3

1 2 3 4 5 6 7 { "access_token": "eyJ0eXAiOiJKV1QiLCJ6aXAiOiJOT05UIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOoIxMskwNWKxZS0yNjA4LTRmOWMtODBkMi0zZmI0NTI0MTUyMmMiLCJjdHMiOiJPQVVUSDJfU1RBVEVMRVNTX0dSQU5UIiwiYXV0aF9sZXZlbCI6MCwiYXVkaXRUcmFja2luZ0lkIjoiNjE2ODE1NmEtNTFkOC00OTgwLTlkMTItZjllZWQ1ZDkzY2E3LTEyMTkwNDUiLCJpc3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TEwNzY1NDJ9.1k8cWH4E_jcdrlszOF47WronhNoYWo1JS5EfdBqdY_ZIqFLbGpkW4SMNeoCdKq_Ux4t2IWcnjRDnEZVCLlxb5eb3ypBZQ2uu3qT0Xiu2ZDC4kx62ArN1tAc174IrTSWfwWwYj_sczui5IPcCBRMOFNuGE8Gi8CPbFKkRVngmrMr2QXqkW2ZbOx9x0NQC5ef3YLwGLUpG77wMZlo7cKpGVGtGf-Y7K0Z8YInSRdNBWUiqdpGXMzpyyPo3qkvzerkAFYFU1QGvcBDqZ0tXJmP4nVNh2fkDNJJeDePD_F4N3fvcqLAPwTjYJHy8Yqu0nQnlrxezrYlEQv3IR8AFRN6kDw", "token_type": "Bearer", "expires_in": 3599 }

 

Example of the payload in Access token

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 { "sub": "10935f1e-2688-4f9c-80d2-3fb45241522c", "cts": "OAUTH2_STATELESS_GRANT", "auth_level": 0, "auditTrackingId": "6168156a-51d8-4980-9d12-f9eed5d93ca7-1219045", "subname": "10935f1e-2688-4f9c-80d2-3fb45241522c", "iss": "https://pfzww.audkenni.is:443/sso/oauth2/realms/root/realms/audkenni", "tokenName": "access_token", "token_type": "Bearer", "authGrantId": "CJxZuyjo71PKxKDBXNYMYQE0MjI", "aud": "myCibaClientId", "nbf": 1611076542, "grant_type": "urn:openid:params:grant-type:ciba", "scope": [ "RELATEDPARTY:MyOwnClient", "signature", "openid", "profile" ], "auth_time": 1611076542, "realm": "/audkenni", "exp": 1611080142, "iat": 1611076542, "expires_in": 3600, "jti": "CizDAQ5XS1cS-WTCZlBoWeLSOM4" }

 

Example of the payload in Id token

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 { "at_hash": "9hkRSDYVcAiU9ghlbSbxbQ", "sub": "10935f1e-2688-4f9c-80d2-3fb45241522c", "signature": "g6feWiRXxBuglnjiXQic+wdQqHG3vN/fjMaAfiEksovloatgQTrz8gaCpse1fEi/dNL9A4ar9ogPqeP2H7csn63TVpT/UxUpkqfuvIqfHTSpvD1KUgpz1xVCdMmv4lj7howqG7pI4UaQQQTnf2/WpqS1VHRgcw0VmCmE5Nvs35EtEZuh4ZCeMhmQ0A7M5zo3vL+ZVCEUBlf3gJvHqaZx5mXINtHxfdoz127RELlR/KP9DMsLtuBs9Kq+hnjd8sbEWnbgI94XWwEVxP+VO6iW9bsPHn2KEHlQPS1ahBQ/51gCDtEaC4SDLMLM8An+2LYWCOqIhZEFotZd96nvIwOE4T9nWblzwBdqYDsDu3X9piXXgyb0q8rJ10EmayQ28hX0yUosyzLNT3DJsjrwtjw9bj5EWivljhYX8VdEkEZCLr5Ow3FSx4wMvLTD7vVFHlGlai71gDadGkar/yGaJj9F1e9cchr8+m2nm6X9q1Tb2ZRdXuZisNYruZuKz04i0vjlQ4QtP+8gRCcP+jV9oVNm6AJlC61EjErBXdgK7WFcgxi9IbwSsI2N+3cmKTNW9eX3D8KtUEc34JdyR4iWKubCx1+y1p6AFnC1rG5mdOzKScl9f5FtGUmtyZMfZlWNbKWpSwjyT/rP+qCZJYP6vprh5bVI54gkuffkNNesRIuf5kmte74hhCRNzBVqRE2PjzbTpzECMWXbTk1a5KaI2bYes9ODfhZXJ+3WVyEqPixomdODvlu4sQd1z0CBmjdLNNRdtQR7lr7T2QOegh869v4GitbOUyszNe28xCVeIC9QXiEKZyswIlM6MbO7RFSaN0vX0FDh6fUj8d+PyKyROR2C16+IKmq/CDa5zvqY9MAn5g7AY2rdnag6ZQyg3z8le9da2FWq8LDLsdnhPB/m4Td99peWjhjf0rwGn+pTlRvgqh1gzXccE9DAR6CuzKoE08QaCfoKGGNnvmekLqcJ1eCvL2djUCFUEdwNEs0gPnaMfC411H9fWL07A7x3CzqOnWKj0xL7o", "auditTrackingId": "6168156a-51d8-4980-9d12-f9eed5d93ca7-1219046", "subname": "10935f1e-2688-4f9c-80d2-3fb45241522c", "certificate": "MIIHozCCBougAwIBAgIDICe5MA0GCSqGS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aS5pcy9mdWxsZ2lsdGF1ZGtlbm5pL2xhdGVzdC5jcmwwHQYDVR0OBBYEFO7/Bqjl28xiU32b/jeG4u5EKRuNMA0GCSqGSIb3DQEBCwUAA4IBAQBDBQaS41p8Ot4I8gKZgoIkOXVwh3hRWZmLuuOq7U5RYzVDhBfeG58VCQDVRuYO2osv361aOlXu36fgHS/GYlImyBvcnSyya/LhcsvHdnSgKviLGdvg0/5skRTqMMAnI0G3krOQs/dTQ4r1ptLaWK3qMsogJm6ZUWIZ58Mcc2vq0EUBwvIxMTPk4ACBMo3mCUKL+iuoOgvM+y92Mavqbg3o/3dUN9aH+MDq+PzIfPfIRyp49UM2rN6rWX4lpKLXkHjEuIZ2oULgbXuS2uQBt1xHinv4Yw/rVhnCC/r4B6QHcS1zHg8C3qGFR1UXt3m2XQ+iJYt+r1zTMLNI7Wub7Ve2", "iss": "https://pfzww.audkenni.is:443/sso/oauth2/realms/root/realms/audkenni", "tokenName": "id_token", "aud": "myCibaClientId", "documentNr": "1406714889-PSBP-Q", "nationalRegisterId": "1406714889", "azp": "myCibaClientId", "auth_time": 1611076542, "name": "Einar Helgi Hrafnsson", "realm": "/audkenni", "exp": 1611080142, "tokenType": "JWTToken", "iat": 1611076542 }

 

 

 

Step 4

 

Step 4: (Userinfo)

Here we ask for the users info using the Access token as Authorization header parameter.

To get the Userinfo we send a POST call to following URI:
https://pfzww.audkenni.is:443/sso/oauth2/realms/root/realms/audkenni/userinfo

Parameters needed in call

We need to add following header parameter

  • Token (Bearer, using the Access token from last call as value)

 

CURL example of the call

1 2 3 curl --location --request POST 'https://pfzww.audkenni.is:443/sso/oauth2/realms/root/realms/audkenni/userinfo' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJ6aXAiOiJOT25FIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIIOiIxMDkwNWYxZS0yNjA4LTRmOWMtODBkMi0zZmI0NTI0MTUyMmMiLCJjdHMiOiJPQVVUSDJfU1RBVEVMRVNTX0dSQU5UIiwiYXV0aF9sZXZlbCI6MCwiYXVkaXRUcmFja2luZ0lkIjoiZWQ5NzcwMTgtOWMxYy00MDM3LWFkNTgtYzYxZGMyMjQ4MGE4LTkzNzUyMCIsImlzcyI6Imh0dHBzOi8vcGZ6d3cuYXVka2VubmkuaXM6NDQzL3Nzby9vYXV0aDIvcmVhbG1zL3Jvb3QvcmVhbG1zL2F1ZGtlbm5pIiwidG9rZW5OYW1lIjoiYWNjZXNzX3Rva2VuIiwidG9rZW5fdHlwZSI6IkJlYXJlciIsImF1dGhHcmFudElkIjoiWHY1Yl9odXNGdklGeXJlOU1yZHRsTXVVM3djIiwiYXVkIjoibXlDaWJhQ2xpZW50SWQiLCJuYmYiOjE2MTEwNzQ3ODUsImdyYW50X3R5cGUiOiJ1cm46b3BlbmlkOnBhcmFtczpncmFudC10eXBlOmNpYmEiLCJzY29wZSI6WyJSRUxBVEVEUEFSVFk6TXlPd25DbGllbnQiLCJzaWduYXR1cmUiLCJvcGVuaWQiLCJwcm9maWxlIl0sImF1dGhfdGltZSI6MTYxMTA3NDc4NSwicmVhbG0iOiIvYXVka2VubmkiLCJleHAiOjE2MTEwNzgzODUsImlhdCI6MTYxMTA3NDc4NSwiZXhwaXJlc19pbiI6MzYwMCwianRpIjoiV2dBX3B0RzJoYmcyN3hoeXYyMktYTmNFeEVrIn0.k9AGl4MVncfmmq9USabdxlaIYlYC0_lrQhJFClZgRtM'

 

C# - RestSharp example of the call

1 2 3 4 5 6 7 var client = new RestClient("https://pfzww.audkenni.is:443/sso/oauth2/realms/root/realms/audkenni/userinfo"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/x-www-form-urlencoded"); request.AddHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJ6aXAiOiJOT25FIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIIOiIxMDkwNWYxZS0yNjA4LTRmOWMtODBkMi0zZmI0NTI0MTUyMmMiLCJjdHMiOiJPQVVUSDJfU1RBVEVMRVNTX0dSQU5UIiwiYXV0aF9sZXZlbCI6MCwiYXVkaXRUcmFja2luZ0lkIjoiZWQ5NzcwMTgtOWMxYy00MDM3LWFkNTgtYzYxZGMyMjQ4MGE4LTkzNzUyMCIsImlzcyI6Imh0dHBzOi8vcGZ6d3cuYXVka2VubmkuaXM6NDQzL3Nzby9vYXV0aDIvcmVhbG1zL3Jvb3QvcmVhbG1zL2F1ZGtlbm5pIiwidG9rZW5OYW1lIjoiYWNjZXNzX3Rva2VuIiwidG9rZW5fdHlwZSI6IkJlYXJlciIsImF1dGhHcmFudElkIjoiWHY1Yl9odXNGdklGeXJlOU1yZHRsTXVVM3djIiwiYXVkIjoibXlDaWJhQ2xpZW50SWQiLCJuYmYiOjE2MTEwNzQ3ODUsImdyYW50X3R5cGUiOiJ1cm46b3BlbmlkOnBhcmFtczpncmFudC10eXBlOmNpYmEiLCJzY29wZSI6WyJSRUxBVEVEUEFSVFk6TXlPd25DbGllbnQiLCJzaWduYXR1cmUiLCJvcGVuaWQiLCJwcm9maWxlIl0sImF1dGhfdGltZSI6MTYxMTA3NDc4NSwicmVhbG0iOiIvYXVka2VubmkiLCJleHAiOjE2MTEwNzgzODUsImlhdCI6MTYxMTA3NDc4NSwiZXhwaXJlc19pbiI6MzYwMCwianRpIjoiV2dBX3B0RzJoYmcyN3hoeXYyMktYTmNFeEVrIn0.k9AGl4MVncfmmq9USabdxlaIYlYC0_lrQhJFClZgRtM"); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content);

 

 

Step 4: Expected response

The answer from this call should give you a PKCS1 Signature and a authentication certificate. The same signature and certificate as is in the Id token from last step.

The REST API service answer is in JSON format.

Best practice

Best practice is to verify the signature and the certificate. Verify the user’s info in answer against the certificate and the social Id number entered by the user in beginning (login_hint). By decoding the signature using the certificate you should end up with the hash from the earlier step.

The response should include following

  • signature (PKCS1)

  • documentNr (variable text, for Auðkennis internal usage)

  • certificate (authentication certificate)

  • nationalRegisterId (The social id number of the user)

  • name (The users name)

  • sub (A unique Id of the user in our system)

  • subname (A unique Id of the user in our system)

Example of answer from step 4

1 2 3 4 5 6 7 8 9 { "signature": "g6feWiRXxBuglnjiXQic+udQqHG3vN/fjMaAEkvoatgQKrz8gaCpse1fEi/dNL7A4ar9ogPqeP2H7csn63TVpT/UxUpkqfuvIqfHTSpvD1KUgpz1xVCdMmv4lj7howqG7pI4UaQQQTnf2/WpqS1VHRgcw0VmCmE5Nvs35EtEZuh4ZCeMhmQ0A7M5zo3vL+ZVCEUBlf3gJvHqaZx5mXINtHxfdoz127RELlR/KP9DMsLtuBs9Kq+hnjd8sbEWnbgI94XWwEVxP+VO6iW9bsPHn2KEHlQPS1ahBQ/51gCDtEaC4SDLMLM8An+2LYWCOqIhZEFotZd96nvIwOE4T9nWblzwBdqYDsDu3X9piXXgyb0q8rJ10EmayQ28hX0yUosyzLNT3DJsjrwtjw9bj5EWivljhYX8VdEkEZCLr5Ow3FSx4wMvLTD7vVFHlGlai71gDadGkar/yGaJj9F1e9cchr8+m2nm6X9q1Tb2ZRdXuZisNYruZuKz04i0vjlQ4QtP+8gRCcP+jV9oVNm6AJlC61EjErBXdgK7WFcgxi9IbwSsI2N+3cmKTNW9eX3D8KtUEc34JdyR4iWKubCx1+y1p6AFnC1rG5mdOzKScl9f5FtGUmtyZMfZlWNbKWpSwjyT/rP+qCZJYP6vprh5bVI54gkuffkNNesRIuf5kmte74hhCRNzBVqRE2PjzbTpzECMWXbTk1a5KaI2bYes9ODfhZXJ+3WVyEqPixomdODvlu4sQd1z0CBmjdLNNRdtQR7lr7T2QOegh869v4GitbOUyszNe28xCVeIC9QXiEKZyswIlM6MbO7RFSaN0vX0FDh6fUj8d+PyKyROR2C16+IKmq/CDa5zvqY9MAn5g7AY2rdnag6ZQyg3z8le9da2FWq8LDLsdnhPB/m4Td99peWjhjf0rwGn+pTlRvgqh1gzXccE9DAR6CuzKoE08QaCfoKGGNnvmekLqcJ1eC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