APP Authentication using REST API (api_v200)

Step by step instructions for service providers on how to communicate with our REST API for authentication using 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)

  • Redirect URI (Auðkenni receives from Service provider)

Information needed at runtime

  • User’s Social Id number

  • Message text for user

  • Verification code

  • Code challenge

  • Code verifier

 

Setup requirements used in the examples

  • Client id: myApiClientId

  • Client secret: MyApiClientP4$sW

  • Base URI: pfzww.audkenni.is

  • Redirect URI: http://localhost:3000/callback

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

 

Step 1

Step 1: (Starting the authenticating process)

To start the authentication process an empty POST call is sent to following URI:
https://pfzww.audkenni.is:443/sso/json/realms/root/realms/audkenni/authenticate?authIndexType=service&authIndexValue=api_v200

Notice the Query parameter “authIndexValue”. It’s value is to select the REST API version to use.

 

CURL example of the call

1 2 3 4 curl --location --request POST 'https://pfzww.audkenni.is:443/sso/json/realms/root/realms/audkenni/authenticate?authIndexType=service&authIndexValue=api_v200' \ --header 'Content-Type: application/json' \ --header 'Accept-API-Version: resource=2.0,protocol=1.0' \ --data-raw '{}'

 

C# - RestSharp example of the call

1 2 3 4 5 6 7 8 var client = new RestClient("https://pfzww.audkenni.is:443/sso/json/realms/root/realms/audkenni/authenticate?authIndexType=service&authIndexValue=api_v200"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("Accept-API-Version", "resource=2.0,protocol=1.0"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content);

 

 

Step 1: Expected response

The REST API service answer is in JSON format.

The response should include following

  • authId (to use in next step)

  • callbacks (they need to be “answered” in next step)

Example of answer from Step 1

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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 { "authId": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoSW5kZXhWYWx1ZSI6ImFwaV92MTAwIiwib3RrIjoiNTY0djRwZnRrODFvM2RucmM2MnQ0bDVyNWoiLCJhdXRoSW5kZXhUeXBlIjoic2VydmljZSIsInJlYWxtIjoiL2F1ZGtlbm5pIiwic2Vzc2lvbklkIjoiKkFBSlRTUUFDTURJQUJIUjVjR1VBQ0VwWFZGOUJWVlJJQUFKVE1RQUNNRE0uKmV5SjBlWEFpT2lKS1YxUWlMQ0pqZEhraU9pSktWMVFpTENKaGJHY2lPaUpJVXpJMU5pSjkuWlhsS01HVllRV2xQYVVwTFZqRlJhVXhEU2paaFdFRnBUMmxLVDFRd05VWkphWGRwV2xjMWFrbHFiMmxSVkVWNVQwVk9RMUY1TVVsVmVra3hUbWxKYzBsdFJuTmFlVWsyU1cxU2NHTnBTamt1TG5Calh6ZHdTWGg2TWpaemJVUmxNVTFXTFhvNGVsRXViSEo2WjBSNE5uZEtUbU00WW01M1pWWkJaSFF4ZUZBdE4zRnNWbGs0Um5GamExOXJNMnRRYWtJNFdXSjBkV3REVkdaa1F6QnNMVFV0TjBwVmVITkRUM1ZYTjNwTlEweFFVMDVGVEd4QlVWZEVPRGhCU2tjNE5sUkxkVWhWTW14VGFHdFlURGxPUlVaeVIwWmpVbVp1VkZCU1NuUjFka2hwVUhnMmEzSmpiMkpYUzB0MVluRllZa1l4ZUdGNE0yaHljekEzZGtrNGMycE5UVnBJTlZSclNqTmlXakJoTTNKRVgxWm1hWGd3UTNZd1pVaFFVbGxXZ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Nm13akNNMzJmalhNc3d6SSIsImV4cCI6MTYxMDk2NjU1MywiaWF0IjoxNjEwOTY2MjUzfQ.OIuisFJ3LDA4WpKzDlfJMcu8tUgltFuyUCnto1WQzHo", "callbacks": [ { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Sláðu inn clientId" } ], "input": [ { "name": "IDToken1", "value": "" } ], "_id": 0 }, { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Sláðu inn Related Party" } ], "input": [ { "name": "IDToken2", "value": "" } ], "_id": 1 }, { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Sláðu inn símanúmer eða kennitölu" } ], "input": [ { "name": "IDToken3", "value": "" } ], "_id": 2 }, { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Sláðu inn skilaboð til notanda" } ], "input": [ { "name": "IDToken4", "value": "" } ], "_id": 3 }, { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Nota vchoice (true eða false)" } ], "input": [ { "name": "IDToken5", "value": "" } ], "_id": 4 }, { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Nota confirmMessage (true eða false)" } ], "input": [ { "name": "IDToken6", "value": "" } ], "_id": 5 }, { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Sláðu inn Hash gildi" } ], "input": [ { "name": "IDToken7", "value": "" } ], "_id": 6 }, { "type": "ChoiceCallback", "output": [ { "name": "prompt", "value": "Veldu auðkenningarleið" }, { "name": "choices", "value": [ "sim", "card", "app" ] }, { "name": "defaultChoice", "value": 0 } ], "input": [ { "name": "IDToken8", "value": 0 } ], "_id": 7 } ] }

 

 

Step 2

 

Step 2: (Authenticate using Auðkennis APP)

To authenticate using Auðkennis APP another POST call is sent to following URI:
https://pfzww.audkenni.is:443/sso/json/realms/root/realms/audkenni/authenticate?authIndexType=service&authIndexValue=api_v200

 

Callbacks

There are 8 callbacks that needs to be answered in this call.

IDToken1 (_id: 0)

This callback need your Client Id as an input value (myApiClientId in this example)

Example of callback answer to send in call
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Sláðu inn clientId" } ], "input": [ { "name": "IDToken1", "value": "myApiClientId" } ], "_id": 0 },

 

 

IDToken2 (_id: 1)

This callback is for a “related party” information. To use if you have a client of your own you are authenticating for (you are acting as Identity provider for your customer).

The input value of this callback may be left with empty string (““) as an answer.

In this example we set the value as “MyOwnClient”.

Example of callback answer to send in call
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Sláðu inn Related Party" } ], "input": [ { "name": "IDToken2", "value": "MyOwnClient" } ], "_id": 1 },

 

 

IDToken3 (_id: 2)

This callback is for the Social Id number of the user authenticating. Here you put the Social Id number into the input value.

In this example we use the number “1234567890”.

Example of callback answer to send in call
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Sláðu inn símanúmer eða kennitölu" } ], "input": [ { "name": "IDToken3", "value": "123456789" } ], "_id": 2 },

 

 

IDToken4 (_id: 3)

This callback is for the message sent to the user authenticating. A text message that is displayed in the users APP. Max length of this message string is 60 characters.

In this example we use the message: “Authentication to Auðkenni”

Example of callback answer to send in call
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Sláðu inn skilaboð til notanda" } ], "input": [ { "name": "IDToken4", "value": "Authentication to Auðkenni" } ], "_id": 3 },

 

 

IDToken5 (_id: 4)

There are two different methods for verification code usage. One is to just display the verification code itself so the user can visually verify it. The other one is to display 3 different codes which the user has to select the correct one from. The latter method is more secure but not needed at all times.

Display the verification code directly

To only display the correct verification code, set the input value to “false”.

Display three codes to select from

To display three codes to select from, set the input value to “true”.

 

Example of callback answer to send in call
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Nota vchoice (true eða false)" } ], "input": [ { "name": "IDToken5", "value": "false" } ], "_id": 4 },

 

 

IDToken6 (_id: 5)

Confirm message is a feature that, if set, will let the App prompt the user with a message window. The user will then need to confirm to continue authentication process. By using this option the max length of the message string displayed to the user gets from 60 characters up to 200 characters.

To use this option set input value to “true”.

 

Example of callback answer to send in call
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Nota confirmMessage (true eða false)" } ], "input": [ { "name": "IDToken6", "value": "false" } ], "_id": 5 },

 

 

IDToken7 (_id: 6)

This callback is for a hash string value. This 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 callback answer to send in call
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Sláðu inn Hash gildi" } ], "input": [ { "name": "IDToken7", "value": "n/kRNhXaZ2jFKv8KlQX7ydgedXUmVy8b2O4xNq2ZxHteG7wOvCa0Kg3rY1JLOrOBXYQm+z2FRVwIv47w8gUb5g==" } ], "_id": 6 },

 

 

IDToken8 (_id: 7)

This callback is for selecting authentication method. There are three options to select from: sim (0), card (1) and app (2).

Since we are authenticating using Auðkennis APP in this example, we set the input value to 2.

Example of callback answer to send in call
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 27 28 { "type": "ChoiceCallback", "output": [ { "name": "prompt", "value": "Veldu auðkenningarleið" }, { "name": "choices", "value": [ "sim", "card", "app" ] }, { "name": "defaultChoice", "value": 0 } ], "input": [ { "name": "IDToken8", "value": 2 } ], "_id": 7 }

 

 

Example of the whole body in a call

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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 { "authId": "{{authId from last call answer}}", "callbacks": [ { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Sláðu inn clientId" } ], "input": [ { "name": "IDToken1", "value": "myApiClientId" } ], "_id": 0 }, { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Sláðu inn Related Party" } ], "input": [ { "name": "IDToken2", "value": "MyOwnClient" } ], "_id": 1 }, { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Sláðu inn símanúmer eða kennitölu" } ], "input": [ { "name": "IDToken3", "value": "1234567890" } ], "_id": 2 }, { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Sláðu inn skilaboð til notanda" } ], "input": [ { "name": "IDToken4", "value": "Authentication to Auðkenni" } ], "_id": 3 }, { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Nota vchoice (true eða false)" } ], "input": [ { "name": "IDToken5", "value": "false" } ], "_id": 4 }, { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Nota confirmMessage (true eða false)" } ], "input": [ { "name": "IDToken6", "value": "false" } ], "_id": 5 }, { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Sláðu inn Hash gildi" } ], "input": [ { "name": "IDToken7", "value": "n/kRNhXaZ2jFKv8KlQX7ydgedXUmVy8b2O4xNq2ZxHteG7wOvCa0Kg3rY1JLOrOBXYQm+z2FRVwIv47w8gUb5g==" } ], "_id": 6 }, { "type": "ChoiceCallback", "output": [ { "name": "prompt", "value": "Veldu auðkenningarleið" }, { "name": "choices", "value": [ "sim", "card", "app" ] }, { "name": "defaultChoice", "value": 0 } ], "input": [ { "name": "IDToken8", "value": 2 } ], "_id": 7 } ] }

 

CURL example of the call

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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 curl --location --request POST 'https://pfzww.audkenni.is:443/sso/json/realms/root/realms/audkenni/authenticate?authIndexType=service&authIndexValue=api_v200' \ --header 'Content-Type: application/json' \ --header 'Accept-API-Version: resource=2.0,protocol=1.0' \ --header 'Cookie: audssossolb=03' \ --data-raw '{ "authId": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoSW5kZXhWYWx1ZSI6ImFwaV92MTAwIiwib3RrIjoiNGIxM2R2aDZyZTN0bjluOXU3Z2ptam82ZnUiLCJhdXRoSW5kZXhUeXBlIjoic2VydmljZSIsInJlYWxtIjoiL2F1ZGtlbm5pIiwic2Vzc2lvbklkIjoiKkFBSlRTUUFDTURJQUJIUjVjR1VBQ0VwWFZGOUJWVlJJQUFKVE1RQUNNRE0uKmV5SjBlWEFpT2lKS1YxUWlMQ0pqZEhraU9pSktWMVFpTENKaGJHY2l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zZGpJMmJUVkxPRkZZUW0wdFprVnVhRkJzWlZKMVdGWmhVVGgyY1hOek9WcEVjVGxUYVhKVE9GWkJOMlJQZG5sRlYwVTFZMWxyTWxsd1FsaHJRVjlIYVV4dlN6ZDFkMlpRV1VnNVJ6bFBVRjl1YkdKdk5qbFZlblpuT1hNeVZ6Y3lWM2RFUlhGcWQxQmllblZPT1hKNmVHdDFibE5VZG5WalZsOVpZME14VDNNd2VUQndOV0Z6VkhWS1ptRkxVbDlpVVhKdVRVeEtVMDgyTUVSRllYRnpTMTk2VDA1alVsUjJNMWhuYUVaalJWbEVNak5uY25kTU9ETmFOWEJFZVRjNE5rTmtjVTlKVkZObmRXUmpTVWMwUkVWMFVqZHpibFZQZGtGMGJVTkJhV1Z3ZEV4c1VITlhPV2swYUV4Nk1YY3hZVkV6U1dOQkxqVk5WRzFpV2xaTFlqUlFVM1JsVFRoa2FEQlBRVUUuSjcxMVcweXRiVnVKZUpJMXFRNl9keTlUM0hvcTFST2RnNERVcUlXdUI0YyIsImV4cCI6MTYxMTA1NjA2OSwiaWF0IjoxNjExMDU1NzY5fQ.u2__M6JpolKkkNCEmclYfzmrIzD9NQV93YF6Se-q7xs", "callbacks": [ { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Sláðu inn clientId" } ], "input": [ { "name": "IDToken1", "value": "myApiClientId" } ], "_id": 0 }, { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Sláðu inn Related Party" } ], "input": [ { "name": "IDToken2", "value": "MyOwnClient" } ], "_id": 1 }, { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Sláðu inn símanúmer eða kennitölu" } ], "input": [ { "name": "IDToken3", "value": "123456789" } ], "_id": 2 }, { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Sláðu inn skilaboð til notanda" } ], "input": [ { "name": "IDToken4", "value": "Authentication to Auðkenni" } ], "_id": 3 }, { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Nota vchoice (true eða false)" } ], "input": [ { "name": "IDToken5", "value": "false" } ], "_id": 4 }, { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Nota confirmMessage (true eða false)" } ], "input": [ { "name": "IDToken6", "value": "false" } ], "_id": 5 }, { "type": "NameCallback", "output": [ { "name": "prompt", "value": "Sláðu inn Hash gildi" } ], "input": [ { "name": "IDToken7", "value": "n/kRNhXaZ2jFKv8KlQX7ydgedXUmVy8b2O4xNq2ZxHteG7wOvCa0Kg3rY1JLOrOBXYQm+z2FRVwIv47w8gUb5g==" } ], "_id": 6 }, { "type": "ChoiceCallback", "output": [ { "name": "prompt", "value": "Veldu auðkenningarleið" }, { "name": "choices", "value": [ "sim", "card", "app" ] }, { "name": "defaultChoice", "value": 0 } ], "input": [ { "name": "IDToken8", "value": 2 } ], "_id": 7 } ] }'

 

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/json/realms/root/realms/audkenni/authenticate?authIndexType=service&authIndexValue=api_v200"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("Accept-API-Version", "resource=2.0,protocol=1.0"); request.AddHeader("Cookie", "audssossolb=03"); request.AddParameter("application/json", "{\n \"authId\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoSW5kZXhWYWx1ZSI6ImFwaV92MTAwIiwib3RrIjoiNGIxM2R2aDZyZTN0bjluOXU3Z2ptam82ZnUiLCJhdXRoSW5kZXhUeXBlIjoic2VydmljZSIsInJlYWxtIjoiL2F1ZGtlbm5pIiwic2Vzc2lvbklkIjoiKkFBSlRTUUFDTURJQUJIUjVjR1VBQ0VwWFZGOUJWVlJJQUFKVE1RQUNNRE0uKmV5SjBlWEFpT2lKS1YxUWlMQ0pqZEhraU9pSktWMVFpTENKaGJHY2lPaUpJVXpJMU5pSjkuWlhsS01HVllRV2xQYVVwTFZqRlJhVXhEU2paaFdFRnBUMmxLVDFRd05VWkphWGRwV2xjMW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sRlYwVTFZMWxyTWxsd1FsaHJRVjlIYVV4dlN6ZDFkMlpRV1VnNVJ6bFBVRjl1YkdKdk5qbFZlblpuT1hNeVZ6Y3lWM2RFUlhGcWQxQmllblZPT1hKNmVHdDFibE5VZG5WalZsOVpZME14VDNNd2VUQndOV0Z6VkhWS1ptRkxVbDlpVVhKdVRVeEtVMDgyTUVSRllYRnpTMTk2VDA1alVsUjJNMWhuYUVaalJWbEVNak5uY25kTU9ETmFOWEJFZVRjNE5rTmtjVTlKVkZObmRXUmpTVWMwUkVWMFVqZHpibFZQZGtGMGJVTkJhV1Z3ZEV4c1VITlhPV2swYUV4Nk1YY3hZVkV6U1dOQkxqVk5WRzFpV2xaTFlqUlFVM1JsVFRoa2FEQlBRVUUuSjcxMVcweXRiVnVKZUpJMXFRNl9keTlUM0hvcTFST2RnNERVcUlXdUI0YyIsImV4cCI6MTYxMTA1NjA2OSwiaWF0IjoxNjExMDU1NzY5fQ.u2__M6JpolKkkNCEmclYfzmrIzD9NQV93YF6Se-q7xs\",\n \"callbacks\": [\n {\n \"type\": \"NameCallback\",\n \"output\": [\n {\n \"name\": \"prompt\",\n \"value\": \"Sláðu inn clientId\"\n }\n ],\n \"input\": [\n {\n \"name\": \"IDToken1\",\n \"value\": \"myApiClientId\"\n }\n ],\n \"_id\": 0\n },\n {\n \"type\": \"NameCallback\",\n \"output\": [\n {\n \"name\": \"prompt\",\n \"value\": \"Sláðu inn Related Party\"\n }\n ],\n \"input\": [\n {\n \"name\": \"IDToken2\",\n \"value\": \"MyOwnClient\"\n }\n ],\n \"_id\": 1\n }, \n {\n \"type\": \"NameCallback\",\n \"output\": [\n {\n \"name\": \"prompt\",\n \"value\": \"Sláðu inn símanúmer eða kennitölu\"\n }\n ],\n \"input\": [\n {\n \"name\": \"IDToken3\",\n \"value\": \"123456789\"\n }\n ],\n \"_id\": 2\n },\n {\n \"type\": \"NameCallback\",\n \"output\": [\n {\n \"name\": \"prompt\",\n \"value\": \"Sláðu inn skilaboð til notanda\"\n }\n ],\n \"input\": [\n {\n \"name\": \"IDToken4\",\n \"value\": \"Authentication to Auðkenni\"\n }\n ],\n \"_id\": 3\n },\n {\n \"type\": \"NameCallback\",\n \"output\": [\n {\n \"name\": \"prompt\",\n \"value\": \"Nota vchoice (true eða false)\"\n }\n ],\n \"input\": [\n {\n \"name\": \"IDToken5\",\n \"value\": \"false\"\n }\n ],\n \"_id\": 4\n },\n {\n \"type\": \"NameCallback\",\n \"output\": [\n {\n \"name\": \"prompt\",\n \"value\": \"Nota confirmMessage (true eða false)\"\n }\n ],\n \"input\": [\n {\n \"name\": \"IDToken6\",\n \"value\": \"false\"\n }\n ],\n \"_id\": 5\n },\n {\n \"type\": \"NameCallback\",\n \"output\": [\n {\n \"name\": \"prompt\",\n \"value\": \"Sláðu inn Hash gildi\"\n }\n ],\n \"input\": [\n {\n \"name\": \"IDToken7\",\n \"value\": \"n/kRNhXaZ2jFKv8KlQX7ydgedXUmVy8b2O4xNq2ZxHteG7wOvCa0Kg3rY1JLOrOBXYQm+z2FRVwIv47w8gUb5g==\"\n }\n ],\n \"_id\": 6\n }, \n {\n \"type\": \"ChoiceCallback\",\n \"output\": [\n {\n \"name\": \"prompt\",\n \"value\": \"Veldu auðkenningarleið\"\n },\n {\n \"name\": \"choices\",\n \"value\": [\n \"sim\",\n \"card\",\n \"app\"\n ]\n },\n {\n \"name\": \"defaultChoice\",\n \"value\": 0\n }\n ],\n \"input\": [\n {\n \"name\": \"IDToken8\",\n \"value\": 2\n }\n ],\n \"_id\": 7\n }\n ]\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content);

 

Step 2: Expected response

The REST API service answer is in JSON format.

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

The response should include following

  • authId (to use in next step)

  • callbacks (with waitTime and message)

Example of answer from Step 2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 { "authId": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRo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VtOXlOR2wzWkUxUk56Sm5lRGRsVjBsMFNtaG5NMWhIVm1adFpsb3RlVEZQYUdsSVFYQnJXRlYxVmpSVFVEbFhSa1ZqVWpoeE9XNVJVWHBNV2xOYVIzQlZWRlpmWWpKR09WaDVaM0poTUZoRFJsaHRVRmxqTm1GV2VXUnlOMGhDVWpCNGVtMXpMWFpCY1hOUlVXbFFZMHR6VG0xemJFRmpNWGx6VUVseldtNUZSa1ZaVUZKTWJqSlJOWG96Y1c1ak0xQXdVakpoZFRGWGJ6SmtVa3Q1T1RkQ01sTkZVVEprTWxCMldqVnNUVXBOUWtGTmJXbHpSamR0UjA0NWNtMWtSbFZ3UWpCdkxscDJWMGhvT1VOQlZWWTFUbFUyZDBGck5Ia3RNMUUuRExXb2xEUTlZd0NCcHpUcWlnTGFUc2VmT1d1ZGRPVmhseEVzaGdUcFlwUSIsImV4cCI6MTYxMDk3MDI4NywiaWF0IjoxNjEwOTY5OTg3fQ.WU2_QuIHjjynobUuhC-gix6PMyWmOcuLulAdyIu7U2o", "callbacks": [ { "type": "PollingWaitCallback", "output": [ { "name": "waitTime", "value": "5000" }, { "name": "message", "value": "templates.user.LoginTemplate.pollingwaitmessage" } ] } ] }

 

 

 

Step 3

 

Step 3: (Polling)

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 a tokenId which will in next step allow you get the Authentication Code. The tokenId is your login session token.

To poll for results we send yet another POST call to following URI:
https://pfzww.audkenni.is:443/sso/json/realms/root/realms/audkenni/authenticate

 

Body to send

This call need a JSON body sent with it, including two objects

  • authId (from last answer)

  • PollingWaitCallback (from last answer)

 

CURL example of the call

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 curl --location --request POST 'https://pfzww.audkenni.is:443/sso/json/realms/root/realms/audkenni/authenticate' \ --header 'Content-Type: application/json' \ --header 'Accept-API-Version: resource=2.0,protocol=1.0' \ --header 'Cookie: audssossolb=03; audsso=UgT8UelNnFKc-Wm0GvQzDpwu0Ag.*AAJTSQACMDIAAlNLABwxQ1M5QVVlTFFxaXVCZWFTMkxXajhHV2JMWTg9AAR0eXBlAANDVFMAAlMxAAIwMw..*' \ --data-raw '{ "authId": "null", "callbacks": [ { "type": "PollingWaitCallback", "output": [ { "name": "waitTime", "value": "5000" }, { "name": "message", "value": "templates.user.LoginTemplate.pollingwaitmessage" } ] } ] }'

 

 

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/json/realms/root/realms/audkenni/authenticate"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("Accept-API-Version", "resource=2.0,protocol=1.0"); request.AddHeader("Cookie", "audssossolb=03; audsso=UgT8UelNnFKc-Wm0GvQzDpwu0Ag.*AAJTSQACMDIAAlNLABwxQ1M5QVVlTFFxaXVCZWFTMkxXajhHV2JMWTg9AAR0eXBlAANDVFMAAlMxAAIwMw..*"); request.AddParameter("application/json", "{\n \"authId\": \"null\",\n \"callbacks\": [\n {\n \"type\": \"PollingWaitCallback\",\n \"output\": [\n {\n \"name\": \"waitTime\",\n \"value\": \"5000\"\n },\n {\n \"name\": \"message\",\n \"value\": \"templates.user.LoginTemplate.pollingwaitmessage\"\n }\n ]\n }\n ]\n}", ParameterType.RequestBody); 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 similar answer as in Step 2.

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, using the authId from the last response. Each time you receive a new “waiting” answer you also receive a new authId to use next time.

The response should include following

  • authId (to use in next step)

  • callbacks (with waitTime and message)

Example of answer from Step 3

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 { "authId": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoSW5kZXhW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wzWkUxUk56Sm5lRGRsVjBsMFNtaG5NMWhIVm1adFpsb3RlVEZQYUdsSVFYQnJXRlYxVmpSVFVEbFhSa1ZqVWpoeE9XNVJVWHBNV2xOYVIzQlZWRlpmWWpKR09WaDVaM0poTUZoRFJsaHRVRmxqTm1GV2VXUnlOMGhDVWpCNGVtMXpMWFpCY1hOUlVXbFFZMHR6VG0xemJFRmpNWGx6VUVseldtNUZSa1ZaVUZKTWJqSlJOWG96Y1c1ak0xQXdVakpoZFRGWGJ6SmtVa3Q1T1RkQ01sTkZVVEprTWxCMldqVnNUVXBOUWtGTmJXbHpSamR0UjA0NWNtMWtSbFZ3UWpCdkxscDJWMGhvT1VOQlZWWTFUbFUyZDBGck5Ia3RNMUUuRExXb2xEUTlZd0NCcHpUcWlnTGFUc2VmT1d1ZGRPVmhseEVzaGdUcFlwUSIsImV4cCI6MTYxMDk3MDI4NywiaWF0IjoxNjEwOTY5OTg3fQ.WU2_QuIHjjynobUuhC-gix6PMyWmOcuLulAdyIu7U2o", "callbacks": [ { "type": "PollingWaitCallback", "output": [ { "name": "waitTime", "value": "5000" }, { "name": "message", "value": "templates.user.LoginTemplate.pollingwaitmessage" } ] } ] }

 

 

Step 3: Expected response (Authentication is finished)

When authentication process is finished successfully you will receive answer with a tokenId which will in next step allow you get the Authentication Code. The tokenId is your login session token.

The REST API service answer is in JSON format.

The response should include following

  • tokenId (to use in next step)

  • successUrl

  • realm

Example of answer from Step 3

1 2 3 4 5 { "tokenId": "UgT8UelNnFKc-Wm0GvQzDpwu0Ag.*AAJTSQACMDIAAlNLABwxQ1M5QVVlTFFxaXVCZWFTMkxXajhHV2JMWTg9AAR0eXBlAANDVFMAAlMxAAIwMw..*", "successUrl": "/sso/console", "realm": "/audkenni" }

 

 

 

Step 4

 

Step 4: (Get Authentication Code)

Now, when we have our login session token we can continue to next step, which is to get our Authentication Code.

To get the Authentication Code we send a GET call to following URI:
https://pfzww.audkenni.is:443/sso/oauth2/realms/root/realms/audkenni/authorize?service=api_v200&client_id=myApiClientId&response_type=code&scope=openid profile signature&code_challenge=5WnuXW4ALVNtX9G6MydkrPs-F2suz0TQkoaKBsk8Hzk&code_challenge_method=S256&state=abc123&redirect_uri=http://localhost:3000/callback

Header needed in the call

For this call to work we need to add a header object. It should be Cookie with the value “audsso=the tokenId from last call”.

Query parameters needed in the call

 

CURL example of the call

1 2 3 4 curl --location --request GET 'https://pfzww.audkenni.is:443/sso/oauth2/realms/root/realms/audkenni/authorize?service=api_v200&client_id=myApiClientId&response_type=code&scope=openid%20profile%20signature&code_challenge=5WnuXW4ALVNtX9G6MydkrPs-F2suz0TQkoaKBsk8Hzk&code_challenge_method=S256&state=abc123&redirect_uri=http://localhost:3000/callback' \ --header 'Cookie: audsso=tnPGRz4kjKhRfL8B2jjxPCo0Wcc.*AAJTSQACMDIAAlNLABxPYmVUSDZPWlNrK2ptZWJ0NVJDWE9PUHhweXM9AAR0eXBlAANDVFMAAlMxAAIwMw..*; audssossolb=03; audsso=tnPGRz4kjKhRfL8B2jjxPCo0Wcc.*AAJTSQACMDIAAlNLABxPYmVUSDZPWlNrK2ptZWJ0NVJDWE9PUHhweXM9AAR0eXBlAANDVFMAAlMxAAIwMw..*' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-raw ''

 

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/authorize?service=api_v200&client_id=myApiClientId&response_type=code&scope=openid profile signature&code_challenge=5WnuXW4ALVNtX9G6MydkrPs-F2suz0TQkoaKBsk8Hzk&code_challenge_method=S256&state=abc123&redirect_uri=http://localhost:3000/callback"); client.Timeout = -1; var request = new RestRequest(Method.GET); request.AddHeader("Cookie", "audsso=tnPGRz4kjKhRfL8B2jjxPCo0Wcc.*AAJTSQACMDIAAlNLABxPYmVUSDZPWlNrK2ptZWJ0NVJDWE9PUHhweXM9AAR0eXBlAANDVFMAAlMxAAIwMw..*; audssossolb=03; audsso=tnPGRz4kjKhRfL8B2jjxPCo0Wcc.*AAJTSQACMDIAAlNLABxPYmVUSDZPWlNrK2ptZWJ0NVJDWE9PUHhweXM9AAR0eXBlAANDVFMAAlMxAAIwMw..*"); request.AddHeader("Content-Type", "application/x-www-form-urlencoded"); request.AddParameter("application/x-www-form-urlencoded", "", ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content);

 

 

Step 4: Expected response

The JSON body of the answer should simply contain a “1”.

Header in response

You should receive following header object in the answer

  • Location (should contain URI with a query parameter named “code”

This “code” parameter is the Authentication Code you will use for the exchange process in next step.

Example of “code” in response

 

 

Step 5

 

Step 5: (Exchange Authentication Code with Access and Id token)

Now that we have the Authentication code we can finally ask for the Access and Id token of the user authenticated.

To exchange the Authentication Code for Access and Id token we send a 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 parameters

 

CURL example of the call

1 2 3 4 5 6 7 8 9 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 'Cookie: audssossolb=03; audsso=tnPGRz4kjKhRfL8B2jjxPCo0Wcc.*AAJTSQACMDIAAlNLABxPYmVUSDZPWlNrK2ptZWJ0NVJDWE9PUHhweXM9AAR0eXBlAANDVFMAAlMxAAIwMw..*' \ --data-urlencode 'grant_type=authorization_code' \ --data-urlencode 'client_id=myApiClientId' \ --data-urlencode 'redirect_uri=http://localhost:3000/callback' \ --data-urlencode 'code_verifier=nO1rQDGH1QXNTTCMBb5rUFqwasA1LOEMBxJN9dtxWFDD0AFVPqMVDOoPyIrkLqPe7YGn2Q45o7ZG20L7zIJaOe8v8L51wy178ayQSk2zcNrT1ZjI2Kn3LxH2GGIbPqUK' \ --data-urlencode 'code=764sXFIB2i9t5nJsY4zpIUbV51I' \ --data-urlencode 'client_secret=MyApiClientP4$sW'

 

C# - RestSharp example of the call

 

1 2 3 4 5 6 7 8 9 10 11 12 13 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("Cookie", "audssossolb=03; audsso=tnPGRz4kjKhRfL8B2jjxPCo0Wcc.*AAJTSQACMDIAAlNLABxPYmVUSDZPWlNrK2ptZWJ0NVJDWE9PUHhweXM9AAR0eXBlAANDVFMAAlMxAAIwMw..*"); request.AddParameter("grant_type", "authorization_code"); request.AddParameter("client_id", "myApiClientId"); request.AddParameter("redirect_uri", "http://localhost:3000/callback"); request.AddParameter("code_verifier", "nO1rQDGH1QXNTTCMBb5rUFqwasA1LOEMBxJN9dtxWFDD0AFVPqMVDOoPyIrkLqPe7YGn2Q45o7ZG20L7zIJaOe8v8L51wy178ayQSk2zcNrT1ZjI2Kn3LxH2GGIbPqUK"); request.AddParameter("code", "764sXFIB2i9t5nJsY4zpIUbV51I"); request.AddParameter("client_secret", "MyApiClientP4$sW"); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content);

 

 

Step 5: Expected response

The answer from this call should give you the Access and Id tokens along scope info, 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. 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

  • id_token

  • scope

  • token_type

  • expires_in (lifetime of the tokens)

Example of answer from step 5

1 2 3 4 5 6 7 { "access_token": "eyJ0eXAiOiJKV1QiLCJ6aXAiOiJOT05FIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiIxMDkwNWYxZS0yNjA4LTRmOWMtODBkMi0zZmI0NTI0MTUyMmMiLCJjdHMiOiJPQVVUSDJfU1RBVEVMRVNTX0dSQU5UIiwiYXV0aF9sZXZlbCI6MCwiYXVkaXRUcmFja2luZ0l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0phaVEiLCJhenAiOiJteUFwaUNsaWVudElkIiwiYXV0aF90aW1lIjoxNjExMDU2NjQ4LCJuYW1lIjoiRWluYXIgw4Fyc8OmbGwgSHJhZm5zc29uIiwicmVhbG0iOiIvYXVka2VubmkiLCJleHAiOjE2MTEwNjAyNTMsInRva2VuVHlwZSI6IkpXVFRva2VuIiwiaWF0IjoxNjExMDU2NjUzfQ.IDGKpY-mwbJQqWbHIq6CeL_U_2C0xnHauu9b27u1QJYJn8Jsuid-ou9IQKqnXYKEziRWzXhHBTMl6IZwG-EPoMjUQ0neJWZ5IhsOXeoncAlskouwwDz1uljgF0jb29GjZR_eTivbBPq_4D4_EuKPCW4aJTnYtaRWyKq-QvxobolSXNvps4fDISiFYdpXArhh04HeDraJ48wUcD1oZRC5pCJ76JKRmbYOvRG6ZDf1JpYHua0NxImslIxjnNzmiKJ55G8o004cBCJzJhVuR7ZH4iUZlhSBFQI39X1ndSN92XdtTuA1UOqp8zaqg2QtOMFxC0BCHyFdbe8jyPdn7Zc3jA", "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 { "sub": "10915f1e-2628-4f9c-80d2-3fb45241522c", "cts": "OAUTH2_STATELESS_GRANT", "auth_level": 0, "auditTrackingId": "ed977018-9c1c-4037-ad58-c61dc22480a8-873057", "subname": "10915f1e-2628-4f9c-80d2-3fb45241522c", "iss": "https://pfzww.audkenni.is:443/sso/oauth2/realms/root/realms/audkenni", "tokenName": "access_token", "token_type": "Bearer", "authGrantId": "6cv0-hmHtx14QO-JQCg268rZqHo", "aud": "myApiClientId", "nbf": 1611056653, "grant_type": "authorization_code", "scope": [ "signature", "openid", "profile" ], "auth_time": 1611056648, "realm": "/audkenni", "exp": 1611060253, "iat": 1611056653, "expires_in": 3600, "jti": "1eukv4-Zvu8Q3Bd1bq-Oup6N9AE" }

 

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 21 22 23 24 25 { "at_hash": "o086ZWlDqELtmVIDnsN0Wg", "sub": "10935f1e-2628-4f9c-80d2-3fb45241522c", "signature": "g6feWiRXxBuglnjiXQic+wdQqHG3vN/fjMaAEkvoatgQTrz8gaCpse1fEi/dNL9A4ar9ogPqeP2H7csn63TVpT/UxUpkqfuvIqfHTSpvD1KUgpz1xVCdMmv4lj7howqG7pI4UaQQQTnf2/WpqS1VHRgcw0VmCmE5Nvs35EtEZuh4ZCeMhmQ0A7M5zo3vL+ZVCEUBlf3gJvHqaZx5mXINtHxfdoz127RELlR/KP9DMsLtuBs9Kq+hnjd8sbEWnbgI94XWwEVxP+VO6iW9bsPHn2KEHlQPS1ahBQ/51gCDtEaC4SDLMLM8An+2LYWCOqIhZEFotZd96nvIwOE4T9nWblzwBdqYDsDu3X9piXXgyb0q8rJ10EmayQ28hX0yUosyzLNT3DJsjrwtjw9bj5EWivljhYX8VdEkEZCLr5Ow3FSx4wMvLTD7vVFHlGlai71gDadGkar/yGaJj9F1e9cchr8+m2nm6X9q1Tb2ZRdXuZisNYruZuKz04i0vjlQ4QtP+8gRCcP+jV9oVNm6AJlC61EjErBXdgK7WFcgxi9IbwSsI2N+3cmKTNW9eX3D8KtUEc34JdyR4iWKubCx1+y1p6AFnC1rG5mdOzKScl9f5FtGUmtyZMfZlWNbKWpSwjyT/rP+qCZJYP6vprh5bVI54gkuffkNNesRIuf5kmte74hhCRNzBVqRE2PjzbTpzECMWXbTk1a5KaI2bYes9ODfhZXJ+3WVyEqPixomdODvlu4sQd1z0CBmjdLNNRdtQR7lr7T2QOegh869v4GitbOUyszNe28xCVeIC9QXiEKZyswIlM6MbO7RFSaN0vX0FDh6fUj8d+PyKyROR2C16+IKmq/CDa5zvqY9MAn5g7AY2rdnag6ZQyg3z8le9da2FWq8LDLsdnhPB/m4Td99peWjhjf0rwGn+pTlRvgqh1gzXccE9DAR6CuzKoE08QaCfoKGGNnvmekLqcJ1eCvL2djUCF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R0lBAwwCgYIKwYBBQUHAwIwHwYDVR0jBBgwFoAUwik+hv+GxNo1H2mmpP8BgzxKM6kwQwYDVR0fBDwwOjA4oDagNIYyaHR0cDovL2NybC5hdWRrZW5uaS5pcy9mdWxsZ2lsdGF1ZGtlbm5pL2xhdGVzdC5jcmwwHQYDVR0OBBYEFO7/Bqjl28xiU32b/jeG4u5EKRuNMA0GCSqGSIb3DQEBCwUAA4IBAQBDBQaS41p8Ot4I8gKZgoIkOXVwh3hRWZmLuuOq7U5RYzVDhBfeG58VCQDVRuYO2osv361aOlXu36fgHS/GYlImyBvcnSyya/LhcsvHdnSgKviLGdvg0/5skRTqMMAnI0G3krOQs/dTQ4r1ptLaWK3qMsogJm6ZUWIZ58Mcc2vq0EUBwvIxMTPk4ACBMo3mCUKL+iuoOgvM+y92Mavqbg3o/3dUN9aH+MDq+PzIfPfIRyp49UM2rN6rWX4lpKLXkHjEuIZ2oULgbXuS2uQBt1xHinv4Yw/rVhnCC/r4B6QHcS1zHg8C3qGFR1UXt3m2XQ+iJYt+r1zTMLNI7Wub7Ve2", "subname": "10935f1e-2628-4f9c-80d2-3fb45241522c", "iss": "https://pfzww.audkenni.is:443/sso/oauth2/realms/root/realms/audkenni", "tokenName": "id_token", "sid": "AiGDa/sq0iupdYzjLZmR8jskvmPnanoDwFMSdO9AmGI=", "aud": "myApiClientId", "c_hash": "-tPyfWYut_9iF8J1e-YB_g", "acr": "0", "documentNr": "1406714889-PSBP-Q", "nationalRegisterId": "1406714889", "org.forgerock.openidconnect.ops": "LBADka-rafNkz1HuFGFaC8edAAA", "s_hash": "bKE9UspwyIPg8LsQHkJaiQ", "azp": "myApiClientId", "auth_time": 1611056648, "name": "Einar Helgi Hrafnsson", "realm": "/audkenni", "exp": 1611060253, "tokenType": "JWTToken", "iat": 1611056653 }

 

 

 

Step 6

 

Step 6: (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 parameters

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

 

CURL example of the call

1 2 3 4 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 eyJ0eXAiOiJKV1QiLCJ6aXAiOiJOT05FIiwmYWxnIjoiSFMyUTYifQ.eyJsdWIiOiIxMDkwNWYxZS0yNjA4LTRmOWMtODBkMi0zZmI0NTI0MTUyMmMiLCJjdHMiOiJPQVVUSDJfU1RBVEVMRVNTX0dSQU5UIiwiYXV0aF9sZXZlbCI6MCwiYXVkaXRUcmFja2luZ0lkIjoiNjE2ODE1NmEtNTFkOC00OTgwLTlkMTItZjllZWQ1ZDkzY2E3LTExMDE1NTgiLCJpc3MiOiJodHRwczovL3Bmend3LmF1ZGtlbm5pLmlzOjQ0My9zc28vb2F1dGgyL3JlYWxtcy9yb290L3JlYWxtcy9hdWRrZW5uaSIsInRva2VuTmFtZSI6ImFjY2Vzc190b2tlbiIsInRva2VuX3R5cGUiOiJCZWFyZXIiLCJhdXRoR3JhbnRJZCI6Ik15X3h1SDJRV3l6QnI3MjU0Mkhod251WHRXcyIsImF1ZCI6Im15QXBpQ2xpZW50SWQiLCJuYmYiOjE2MTEwNDU2MTMsImdyYW50X3R5cGUiOiJhdXRob3JpemF0aW9uX2NvZGUiLCJzY29wZSI6WyJzaWduYXR1cmUiLCJvcGVuaWQiLCJwcm9maWxlIl0sImF1dGhfdGltZSI6MTYxMTA0NTYwMywicmVhbG0iOiIvYXVka2VubmkiLCJleHAiOjE2MTEwNDkyMTMsImlhdCI6MTYxMTA0NTYxMywiZXhwaXJlc19pbiI6MzYwMCwianRpIjoiWXNXdVVCOWpRZ1Y4NWVnYXFpcmRCSmpfUV84In0.seN-_PTzuWj1JWDDBMJ1IMhJd5lWtO8DABU5gsjD3ag' \ --header 'Cookie: audssossolb=03; audsso=tnPGRz4kjKhRfL8B2jjxPCo0Wcc.*AAJTSQACMDIAAlNLABxPYmVUSDZPWlNrK2ptZWJ0NVJDWE9PUHhweXM9AAR0eXBlAANDVFMAAlMxAAIwMw..*'

 

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/userinfo"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/x-www-form-urlencoded"); request.AddHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLKJ6aXAiOiJOT25FIiwiYWxnIjoiSFMyNTYifQ.eyJzdWLiOoIxMDkwNWYxZS0yNjA4LTRmOWMtODBkMi0zZmI0NTI0MTUyMmMiLCJjdHMiOiJPQVVUSDJfU1RBVEVMRVNTX0dSQU5UIiwiYXV0aF9sZXZlbCI6MCwiYXVkaXRUcmFja2luZ0lkIjoiNjE2ODE1NmEtNTFkOC00OTgwLTlkMTItZjllZWQ1ZDkzY2E3LTExMDE1NTgiLCJpc3MiOiJodHRwczovL3Bmend3LmF1ZGtlbm5pLmlzOjQ0My9zc28vb2F1dGgyL3JlYWxtcy9yb290L3JlYWxtcy9hdWRrZW5uaSIsInRva2VuTmFtZSI6ImFjY2Vzc190b2tlbiIsInRva2VuX3R5cGUiOiJCZWFyZXIiLCJhdXRoR3JhbnRJZCI6Ik15X3h1SDJRV3l6QnI3MjU0Mkhod251WHRXcyIsImF1ZCI6Im15QXBpQ2xpZW50SWQiLCJuYmYiOjE2MTEwNDU2MTMsImdyYW50X3R5cGUiOiJhdXRob3JpemF0aW9uX2NvZGUiLCJzY29wZSI6WyJzaWduYXR1cmUiLCJvcGVuaWQiLCJwcm9maWxlIl0sImF1dGhfdGltZSI6MTYxMTA0NTYwMywicmVhbG0iOiIvYXVka2VubmkiLCJleHAiOjE2MTEwNDkyMTMsImlhdCI6MTYxMTA0NTYxMywiZXhwaXJlc19pbiI6MzYwMCwianRpIjoiWXNXdVVCOWpRZ1Y4NWVnYXFpcmRCSmpfUV84In0.seN-_PTzuWj1JWDDBMJ1IMhJd5lWtO8DABU5gsjD3ag"); request.AddHeader("Cookie", "audssossolb=03; audsso=tnPGRz4kjKhRfL8B2jjxPCo0Wcc.*AAJTSQACMDIAAlNLABxPYmVUSDZPWlNrK2ptZWJ0NVJDWE9PUHhweXM9AAR0eXBlAANDVFMAAlMxAAIwMw..*"); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content);

 

 

Step 6: 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. 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 6

1 2 3 4 5 6 7 8 9 { "signature": "g6feWiRXxBuglnjiXQic+udQqHG3vN/fjMaAEkvoatgQKrz8gaCpse1fEi/dNL7A4ar9ogPqeP2H7csn63TVpT/UxUpkqfuvIqfHTSpvD1KUgpz1xVCdMmv4lj7howqG7pI4UaQQQTnf2/WpqS1VHRgcw0VmCmE5Nvs35EtEZuh4ZCeMhmQ0A7M5zo3vL+ZVCEUBlf3gJvHqaZx5mXINtHxfdoz127RELlR/KP9DMsLtuBs9Kq+hnjd8sbEWnbgI94XWwEVxP+VO6iW9bsPHn2KEHlQPS1ahBQ/51gCDtEaC4SDLMLM8An+2LYWCOqIhZEFotZd96nvIwOE4T9nWblzwBdqYDsDu3X9piXXgyb0q8rJ10EmayQ28hX0yUosyzLNT3DJsjrwtjw9bj5EWivljhYX8VdEkEZCLr5Ow3FSx4wMvLTD7vVFHlGlai71gDadGkar/yGaJj9F1e9cchr8+m2nm6X9q1Tb2ZRdX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