APP Signing using CIBA (Selected Cert/device)

Step by step instructions for service providers on how to Signing using CIBA and Auðkennis APP on a selected device (selected cert).

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 Cert Choice 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-certificate-choice”. 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 (leave it as ““ (empty))

  • binding_content (leave it as ““ (empty))

Also needed to create the JWT

  • Private key (to sign the JWT)

  • Alg info (Should be “RS256”)

Example of JWT

1 eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJsb2dpbl9oaW50IjoiMTIzNDU2Nzg5MCIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgc2lnbmF0dXJlIFJFTEFURURQQVJUWTpNeU93bkNsaWVudCIsImFjcl92YWx1ZXMiOiJhcHAtY2VydGlmaWNhdGUtY2hvaWNlIiwiaXNzIjoibXlDaWJhQ2xpZW50SWQiLCJhdWQiOiJodHRwczovL3Bmend3LmF1ZGtlbm5pLmlzOjQ0My9zc28vb2F1dGgyL3JlYWxtcy9yb290L3JlYWxtcy9hdWRrZW5uaSIsImV4cCI6MTYxMTE1NTgwOC4zMjUsImJpbmRpbmdfbWVzc2FnZSI6IiIsImJpbmRpbmdfY29udGVudCI6IiJ9.D8GqbBlMtckYTnUpBNG3kif-yZcDFQ3FtVEC3cNEXcQCMNqTBHdzv3Ek43t4eVGVdSyoBFpNv3xnDhHH3-EsdyTkKpI6mDcIsHaropA0qnXYKahs0rD3ml27EJ0QvPC5ykdwIA6zgnfOiWX-VLRHFOdylAlRCBTtTH957gaG1TMJI3aRpxyVVZj2YgVv7QdMAoBe3CaDwft52Rcxil8n4ZeaHNJ0sCtsY61nGdj1ARM2MbjLmmjBDEQq7a_GgoE8QvqQ5yH_3ipM9KD17N3_8HEfQMU0SdsNw7eowNzYezPwFJU0MACKSfB8xJU0oHrOVsD_31vpW1R94lVhI4-YdQ

 

Example of JWT Payload

1 2 3 4 5 6 7 8 9 10 { "login_hint": "1234567890", "scope": "openid profile signature RELATEDPARTY:MyOwnClient", "acr_values": "app-certificate-choice", "iss": "myCibaClientId", "aud": "https://pfzww.audkenni.is:443/sso/oauth2/realms/root/realms/audkenni", "exp": 1611155808.325, "binding_message": "", "binding_content": "" }

 

 

Step 2

 

Step 2: (Cert Choice)

To ask for users Cert Choice 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 signing 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 1)

After executing Step 2 the Cert Choice 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 cert choice process. When cert choice process is finished successfully you will receive answer with Access and Id token of the user.

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 (Cert Choice still in process)

If you run the poll call before the users cert choice 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 (Cert Choice is finished)

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

The Id token contains a document number and a signing certificate.

The REST API service answer is in JSON format.

Best practice

Best practice is to verify the users info in the Id token against the users info in the certificate and the social Id number entered by the user in beginning (login_hint).

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": "eyJ0eXAiOiJKVKvhs6EfaXAiOiJOT05FIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiIxMmC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QiOjE2MTExNTYzODF9.RUp-GZCGuc_XnLJY94Qus295NFabs5MK__SjTTLaj5UMJnLkP76480oHBuRQxjdOvFcsGxUp6Pyw82NVc73Pb1EJKvbHJPgTNY2mcu3EN92Qtau-5Gb84aAgMcNtDuT0qN7ubMac6DLs4-jKzkwy2M_GcxAdu-DRuLOSPdnukFjkv2O6syvT3n82X9U_YB7zU6nPja9tnPDMkJZaHuj81RJPwb3q3xzRcS65bm5jplELmdBawhDTv65nFSFbDFBGCG-Fpq99tljFkx8atmeaWNeiBF05EyqhicuLpsGhoiMLWmImOIm_7aJADqUJ4iOdYRNbPPxQNLgVfA2Vq1yDdA", "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": "ed977018-9c1c-4037-ad58-c61dc22480a8-1195839", "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": "pubwuCtjml9WYrktJZfe6L2YF0I", "aud": "myCibaClientId", "nbf": 1611156381, "grant_type": "urn:openid:params:grant-type:ciba", "scope": [ "RELATEDPARTY:MyOwnClient", "signature", "openid", "profile" ], "auth_time": 1611156381, "realm": "/audkenni", "exp": 1611159981, "iat": 1611156381, "expires_in": 3600, "jti": "w5AauJH2UHty81d6Ig_yZ2seSAI" }

 

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": "tXY741CJ3eLpfdGzHjxHpg", "sub": "10935f1e-2688-4f9c-80d2-3fb45241522c", "signature": "na", "auditTrackingId": "ed977018-9c1c-4037-ad58-c61dc22480a8-1195841", "subname": "10935f1e-2688-4f9c-80d2-3fb45241522c", "certific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MAkGBwQAjkYBBgEwCwYDVR0PBAQDAgZAMB8GA1UdIwQYMBaAFMIpPob/hsTaNR9ppqT/AYM8SjOpMEMGA1UdHwQ8MDowOKA2oDSGMmh0dHA6Ly9jcmwuYXVka2VubmkuaXMvZnVsbGdpbHRhdWRrZW5uaS9sYXRlc3QuY3JsMB0GA1UdDgQWBBTtDwkUJEuw3CmH2orCSlKYSFkWjTANBgkqhkiG9w0BAQsFAAOCAQEAHg7uDroJxtk0mSZhLXA++4eGcaHyOPbrLipm0MxNDKQYYOoPPjCTxJm4EpLWk4o/dcEggBjDYDm8f/qB4918d9NScJKhY1QE8vwYCjzXZPcaYUznD8NZeDu+FUAKcr1VvPBxUZyZS+Lz1O/SXj660loQmIZX5MeEKOdgt/MCqkeLz2qb6pIgg6W5MFO7HYhORZ14AIs543yMVoO3FyKSkzqMABv5yrdJtoQD5wwqoq8PEbub9TAnb1yg8xI6SF91mmq056kSwMFTlKYog2FWfuqsXU2dIOh9Zj4FNWOwluX1yyK0hsqZGTDE3uc3savxHAitp4SwXCunKVYL4+jlTA==", "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": 1611156381, "name": "Einar Helgi Hrafnsson", "realm": "/audkenni", "exp": 1611159981, "tokenType": "JWTToken", "iat": 1611156381 }

 

 

 

Step 4

 

Step 4: (Userinfo 1)

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 document number and a signing certificate. The same as in the Id token from last step.

The REST API service answer is in JSON format.

Best practice

Best practice is to verify the users info in the Id token against the users info in the certificate and the social Id number entered by the user in beginning (login_hint).

The response should include following

  • signature (with value “na”)

  • documentNr (text, for use in next step)

  • certificate (signing 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": "na", "documentNr": "1406714889-PSBP-Q", "certificate": "MIIH3TCCBsWgAwIBAgIDICe6MA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAklTMRMwEQYDVQQFEwo1MjEwMDAyNzkwMRUwEwYDVQQKEwxBdWRrZW5uaSBoZi4xJzAlBgNVBAsTHlV0Z2VmYW5kaSBmdWxsZ2lsZHJhIHNraWxyaWtqYTEaMBgGA1UEAxMRRnVsbGdpbHQgYXVka2VubmkwHhcNMjAxMjEyMTYyNjIwWhcNMjUxMjEyMTYyNjIwWjByMRIwEAYDVQQEEwlIcmFmbnNzb24xFzAVBgNVBCoMDkVpbmFyIMOBcnPDpmxsMQswCQYDVQQGEwJJUzETMBEGA1UEBRMKMTUwNTcxNDQ4OTEhMB8GA1UEAwwYRWluYXIgw4Fyc8OmbGwgSHJhZm5zc29uMIIDITANBgkqhkiG9w0BAQEFAAOCAw4AMIIDCQKCAwB7vbkjfHfH4/5ewKRvJYd4uufNDH3HiAW4hyGmIsVaGCuFOkvUuYbQRFGW//OyYJs6IuEWUhoiCQUUsVmYfmN9gnhF9cqVDDejmYO5OZwiIpxnxjx7NlwfD9uBdA/Qes+Hzf1Vk8/9pBDI5tx22C4iCIMRMxqzGEDkc3U7NQ5mIpKp6rqp7N7SVBjrhI6piFbO8BrysERFIQK3vKpAXp/o+7p5G9QMB5fZb/NHXcPQ2Dkb6+fCJRwduFrnQnsisF877FCfLDAaCYoeN0r7UdwE7nv4QEcbTlMUJX7IzEyLy7umwG1TmPP2HgQwQOUexjyLQJ4lLDp4C1sC9IUfJhQKlFdMzxquh1mFSFc43LJPJFYk5TN80923vNzFnpSOf7ecyyIkD8otUxfLUI7SRDW9o9vZ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cDovL2NkcC5pc2xhbmRzcm90LmlzL3NraWxyaWtpL2Z1bGxnaWx0YXVka2VubmkucDdiMGMGCCsGAQUFBwEDBFcwVTAIBgYEAI5GAQEwCAYGBACORgEEMCoGBgQAjkYBBTAgMB4WGGh0dHBzOi8vcmVwby5hdWRrZW5uaS5pcxMCSVMwEwYGBACORgEGMAkGBwQAjkYBBgEwCwYDVR0PBAQDAgZAMB8GA1UdIwQYMBaAFMIpPob/hsTaNR9ppqT/AYM8SjOpMEMGA1UdHwQ8MDowOKA2oDSGMmh0dHA6Ly9jcmwuYXVka2VubmkuaXMvZnVsbGdpbHRhdWRrZW5uaS9sYXRlc3QuY3JsMB0GA1UdDgQWBBTtDwkUJEuw3CmH2orCSlKYSFkWjTANBgkqhkiG9w0BAQsFAAOCAQEAHg7uDroJxtk0mSZhLXA++4eGcaHyOPbrLipm0MxNDKQYYOoPPjCTxJm4EpLWk4o/dcEggBjDYDm8f/qB4918d9NScJKhY1QE8vwYCjzXZPcaYUznD8NZeDu+FUAKcr1VvPBxUZyZS+Lz1O/SXj660loQmIZX5MeEKOdgt/MCqkeLz2qb6pIgg6W5MFO7HYhORZ14AIs543yMVoO3FyKSkzqMABv5yrdJtoQD5wwqoq8PEbub9TAnb1yg8xI6SF91mmq056kSwMFTlKYog2FWfuqsXU2dIOh9Zj4FNWOwluX1yyK0hsqZGTDE3uc3savxHAitp4SwXCunKVYL4+jlTA==", "nationalRegisterId": "1406714889", "name": "Einar Helgi Hrafnsson", "sub": "10935f1e-2688-4f9c-80d2-3fb45241522c", "subname": "10935f1e-2688-4f9c-80d2-3fb45241522c" }

 

 

 

Step 5

Step 5: (Creating Sign With Cert JSON Web Token)

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

What the JWT need to include

  • login_hint (here we put the documentNr from last step results)

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

  • acr_values (“app-sign-with-certificate”. 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 Signing“

Hash string generated

j9AAK/VM1kokNqRoDTHGOXZ8lFM6nt9q+vWBB1dvyItYcoJ9WH4d8HGmb3RbafzBhg1sf0cY0qBZatGaUOoLKA==

Verification code calculated from the hash

9502

 

Example of JWT

1 eyJ0eXAiOiJKV1Kdh3T82JhbGciOiJSUzI1NiJ9.eyJsb2dpbl9oaW5mV3fG8seMTUwNTcxNDQ4OS1QU0JQLVEiLCJzY29wZSI6Im9wZW5pZCBwcm9maWxlIHNpZ25hdHVyZSBSRUxBVEVEUEFSVFk6S2VyZmlzcHJvZmFyaW5uIiwiYWNyX3ZhbHVlcyI6ImFwcC1zaWduLXdpdGgtY2VydGlmaWNhdGUiLCJpc3MiOiJteUNpYmFDbGllbnRJZCIsImF1ZCI6Imh0dHBzOi8vcGZ6d3cuYXVka2VubmkuaXM6NDQzL3Nzby9vYXV0aDIvcmVhbG1zL3Jvb3QvcmVhbG1zL2F1ZGtlbm5pIiwiZXhwIjoxNjExMTU3NzA2Ljk1LCJiaW5kaW5nX21lc3NhZ2UiOiJBdcOwa2VubmkgQVBQIFNpZ25pbmciLCJiaW5kaW5nX2NvbnRlbnQiOiJqOUFBSy9WTTFrb2tOcVJvRFRIR09YWjhsRk02bnQ5cSt2V0JCMWR2eUl0WWNvSjlXSDRkOEhHbWIzUmJhZnpCaGcxc2YwY1kwcUJaYXRHYVVPb0xLQT09In0.FT51HlTZ16BAwyRByqNdxFgbOyyo9p_Kos8qGvt96nNq6v1SvNtpYeyWyYxDJVLLkWkmpDEKfMVljquwe6S6WNfd4d2JjUaoV2MzGHGwCaAuB0vhJmaix1xEyZ3Dhs54ibRlEPNUEVswZWSksKuxotKn7tOlDcv46649jLcjR22vvHoFlDDFIg_kNkgR0pQtaUPS68yLbiG-Q1QXvRdyFXN5S9j8ePtNTP7x6tRs5F-Xk61Dt8avZmbWLcc7MsTZc9s0y99Y3vEhPuLUfVYfORY3xZDKXuchDF7FcLGHVOzTfTWU0888L_H9OXh2DQwIfe0yzeMJwhk5fzsvn8Ty5w

 

Example of JWT Payload

1 2 3 4 5 6 7 8 9 10 { "login_hint": "1406714889-PSBP-Q", "scope": "openid profile signature RELATEDPARTY:MyOwnClient", "acr_values": "app-sign-with-certificate", "iss": "myCibaClientId", "aud": "https://pfzww.audkenni.is:443/sso/oauth2/realms/root/realms/audkenni", "exp": 1611157706.95, "binding_message": "Auðkenni APP Signing", "binding_content": "j9AAK/VM1kokNqRoDTHGOXZ8lFM6nt9q+vWBB1dvyItYcoJ9WH4d8HGmb3RbafzBhg1sf0cY0qBZatGaUOoLKA==" }

 

Example of JWT Payload using optional parameters

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

 

 

Step 6

 

Step 6: (Signing with selected Cert)

To sign 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 6: Expected response

The CIBA service answer is in JSON format.

When Step 2 is executed the signing 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 6

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

 

 

Step 7

 

Step 7: (Poll for token)

After executing Step 2 the signing 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 signing process. When signing process is finished successfully you will receive answer with Access and Id token of the user.

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 7: Expected response (Signing still in process)

If you run the poll call before the user signing 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 7

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

 

Step 7: Expected response (Signing 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 signing 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 7

1 2 3 4 5 6 7 { "access_token": "eyJ0eXAiOiJKV1QiLCJ6aXBvu7MdOT05FIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiIxMDkMwRe3i7HZS0yNjA4LTRmOWMtODBkMi0zZmI0NTI0MTUyMmMiLCJjdHMiOiJPQVVUSDJfU1RBVEVMRVNTX0dSQU5UIiwiYXV0aF9sZXZlbCI6MCwiYXVkaXRUcmFja2luZ0lkIjoiZWQ5NzcwMTgtOWMxYy00MDM3LWFkNTgtYzYxZGMyMjQ4MGE4LTExODQwODMiLCJpc3MiOiJodHRwczovL3Bmend3LmF1ZGtlbm5pLmlzOjQ0My9zc28vb2F1dGgyL3JlYWxtcy9yb290L3JlYWxtcy9hdWRrZW5uaSIsInRva2VuTmFtZSI6ImFjY2Vzc190b2tlbiIsInRva2VuX3R5cGUiOiJCZWFyZXIiLCJhdXRoR3JhbnRJZCI6IjhqVHM3MGEzNDZ5VElsbVYySnBkS3JmalhIayIsImF1ZCI6Im15Q2liYUNsaWVudElkIiwibmJmIjoxNjExMTUyOTk4LCJncmFudF90eXBlIjoidXJuOm9wZW5pZDpwYXJhbXM6Z3JhbnQtdHlwZTpjaWJhIiwic2NvcGUiOlsiUkVMQVRFRFBBUlRZOk15T3duQ2xpZW50Iiwic2lnbmF0dXJlIiwib3BlbmlkIiwicHJvZmlsZSJdLCJhdXRoX3RpbWUiOjE2MTExNTI5OTgsInJlYWxtIjoiL2F1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"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": "ed977018-9c1c-4037-ad58-c61dc22480a8-1184083", "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": "8jTs70a346yTIlmV2JpdKrfjXHk", "aud": "myCibaClientId", "nbf": 1611152998, "grant_type": "urn:openid:params:grant-type:ciba", "scope": [ "RELATEDPARTY:MyOwnClient", "signature", "openid", "profile" ], "auth_time": 1611152998, "realm": "/audkenni", "exp": 1611156598, "iat": 1611152998, "expires_in": 3600, "jti": "EtOFxU1jRtNgWMS-c895YRHDs6Y" }

 

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": "X3W6yYbLR_UGIzML8dg-Ew", "sub": "10935f1e-2688-4f9c-80d2-3fb45241522c", "signature": "IXdyQJ2kOyzY1Bmus//MF8Zfx7WYm7OYM22bFrj7eDi+KZbGw4ihESE/tWigumLhEPOPYoS/wyDl7XX2dtauMF2vt+PxsAPinbORCgolYrYV5j2AyPRpuFY9vawB7US/yGKjsVRBXF1VCVWXkUHVKnGaou9FketAxOHpVXTb5nS+62qeiVd9/4FhH3IodZWgV3OsYxr50oYRaz6O4RWHcPW3q9XzZ91AEVDSX+Eek2rwDykj57tAI2rDW7MTWAAqs1rxUYIe8DaJdqUK1ayCVSBUNBdfmLktzMOjcSPwYKj6iZlGnPQjc6LSO12h1UyIzOC0aqqTibUXyy/7yr45G0neQcbOCqfq7mIEop45bH0UZm2DJWMX9O8aj4mfaBA4jFYIIJ6ch3PoXdTFb+gcN3Ns4jLhpJyeBJcXR2KDsWbM229Yzuzp76s85l8dzn4aFDqQ6t55at/8eurpamrjMIvdjBrJ6vntStb1wnD22LCquamuq6KCl0MDDEUn/tj8PQmmK2i9ZiHQ0oz9/RDOx0R2JXSYeZToe9gcRvvG3HT82shNtoagqXNms5JPRnsbKFr/E219AOmSTNmoBLvPw9wK5GqJZGHS3s45tszkjPYKABHNJ6vNRw1GjLzVGH3LFiZ/lmUgwB172ZLRGffNN6q80N7uIgcEMFxoHk/ZBjSnBcmENFfQyZky2aNaQCPZmdjPSiLmI/TeL/vLOy1J8CaKdNKnBaCm48LNKT+ZGWMYt9iGDKU50QjYChgrGL3uOgCPGJkunjORIQuSHg/hbsyZWnMTTpiAYyI9a4OwTH72uZV/JscbfLIqFLTLwoFK654/Rb1V/1etXKnjlfqVD/8rj6a+7rVyaE47r02ltS95pvem1esCwnQm2DwiRg1pEBUKHhTp+Pn0iQN26YgnHts8OBbWjUw9KRidsb60Iue/znj71IIwsBiNmoFQ5NsL46i4bTb50yWnMDIG2S6bd5UaeCcZUvHpUM/n2oiuoWBf9bHLEyHICt9CcIB0siTx9vz", "auditTrackingId": "ed977018-9c1c-4037-ad58-c61dc22480a8-1184084", "subname": "10935f1e-2688-4f9c-80d2-3fb45241522c", "certificate": "MIIH3TCCBsWgAwIBAgIDIoGu7e3Fr0GCSqGSIb3DQEBCwUAMHkdjvUE3AJBgNVBAYTAklTMRMwEQYDVQQFEwo1MjEwMDAyNzkwMRUwEwYDVQQKEwxBdWRrZW5uaSBoZi4xJzAlBgNVBAsTHlV0Z2VmYW5kaSBmdWxsZ2lsZHJhIHNraWxyaWtqYTEaMBgGA1UEAxMRRnVsbGdpbHQgYXVka2VubmkwHhcNMjAxMjEyMTYyNjIwWhcNMjUxMjEyMTYyNjIwWjByMRIwEAYDVQQEEwlIcmFmbnNzb24xFzAVBgNVBCoMDkVpbmFyIMOBcnPDpmxsMQswCQYDVQQGEwJJUzETMBEGA1UEBRMKMTUwNTcxNDQ4OTEhMB8GA1UEAwwYRWluYXIgw4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MCqkeLz2qb6pIgg6W5MFO7HYhORZ14AIs543yMVoO3FyKSkzqMABv5yrdJtoQD5wwqoq8PEbub9TAnb1yg8xI6SF91mmq056kSwMFTlKYog2FWfuqsXU2dIOh9Zj4FNWOwluX1yyK0hsqZGTDE3uc3savxHAitp4SwXCunKVYL4+jlTA==", "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": 1611152998, "name": "Einar Helgi Hrafnsson", "realm": "/audkenni", "exp": 1611156598, "tokenType": "JWTToken", "iat": 1611152998 }

 

 

 

Step 8

 

Step 8: (Userinfo 2)

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 8: Expected response

The answer from this call should give you a PKCS1 Signature and a signing 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 (signing 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 8

1 2 3 4 5 6 7 8 9 { "signature": "IXdyQJ2kOyzY1Bmus//MF8Zfx7WYm7OYM22bFrj7eDi+KZbGw4ihESE/tWigumLhEPOPYoS/wyDl7XX2dtauMF2vt+PxsAPinbORCgolYrYV5j2AyPRpuFY9vawB7US/yGKjsVRBXF1VCVWXkUHVKnGaou9FketAxOHpVXTb5nS+62qeiVd9/4FhH3IodZW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TANBgkqhkiG9w0BAQsFAAOCAQEAHg7uDroJxtk0mSZhLXA++4eGcaHyOPbrLipm0MxNDKQYYOoPPjCTxJm4EpLWk4o/dcEggBjDYDm8f/qB4918d9NScJKhY1QE8vwYCjzXZPcaYUznD8NZeDu+FUAKcr1VvPBxUZyZS+Lz1O/SXj660loQmIZX5MeEKOdgt/MCqkeLz2qb6pIgg6W5MFO7HYhORZ14AIs543yMVoO3FyKSkzqMABv5yrdJtoQD5wwqoq8PEbub9TAnb1yg8xI6SF91mmq056kSwMFTlKYog2FWfuqsXU2dIOh9Zj4FNWOwluX1yyK0hsqZGTDE3uc3savxHAitp4SwXCunKVYL4+jlTA==", "nationalRegisterId": "1406714889", "name": "Einar Helgi Hrafnsson", "sub": "10935f1e-2688-4f9c-80d2-3fb45241522c", "subname": "10935f1e-2688-4f9c-80d2-3fb45241522c" }