Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
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 eyJ0eXAiOiJKV1QiLCJ6aXAiOiJOT25FIiwiYWxnIjoiSFMyNTYifQeyJ0eXAiOiJKV1QiLCJ6aXAiOiJOT05FIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIIOiIxMDkwNWYxZS0yNjA4LTRmOWMtODBkMi0zZmI0NTI0MTUyMmMiLCJjdHMiOiJPQVVUSDJfU1RBVEVMRVNTX0dSQU5UIiwiYXV0aF9sZXZlbCI6MCwiYXVkaXRUcmFja2luZ0lkIjoiZWQ5NzcwMTgtOWMxYy00MDM3LWFkNTgtYzYxZGMyMjQ4MGE4LTkzNzUyMCIsImlzcyI6Imh0dHBzOi8vcGZ6d3cuYXVka2VubmkuaXM6NDQzL3Nzby9vYXV0aDIvcmVhbG1zL3Jvb3QvcmVhbG1zL2F1ZGtlbm5pIiwidG9rZW5OYW1lIjoiYWNjZXNzX3Rva2VuIiwidG9rZW5fdHlwZSI6IkJlYXJlciIsImF1dGhHcmFudElkIjoiWHY1Yl9odXNGdklGeXJlOU1yZHRsTXVVM3djIiwiYXVkIjoibXlDaWJhQ2xpZW50SWQiLCJuYmYiOjE2MTEwNzQ3ODUsImdyYW50X3R5cGUiOiJ1cm46b3BlbmlkOnBhcmFtczpncmFudC10eXBlOmNpYmEiLCJzY29wZSI6WyJSRUxBVEVEUEFSVFk6TXlPd25DbGllbnQiLCJzaWduYXR1cmUiLCJvcGVuaWQiLCJwcm9maWxlIl0sImF1dGhfdGltZSI6MTYxMTA3NDc4NSwicmVhbG0iOiIvYXVka2VubmkiLCJleHAiOjE2MTEwNzgzODUsImlhdCI6MTYxMTA3NDc4NSwiZXhwaXJlc19pbiI6MzYwMCwianRpIjoiV2dBX3B0RzJoYmcyN3hoeXYyMktYTmNFeEVrIn0eyJzdWIiOiIxMDkwNWYxZS0yNjA4LTRmOWMtODBkMi0zZmI0NTI0MTUyMmMiLCJjdHMiOiJPQVVUSDJfU1RBVEVMRVNTX0dSQU5UIiwiYXV0aF9sZXZlbCI6MCwiYXVkaXRUcmFja2luZ0lkIjoiZWQ5NzcwMTgtOWMxYy00MDM3LWFkNTgtYzYxZGMyMjQ4MGE4LTExNDk2NjUiLCJpc3MiOiJodHRwczovL3Bmend3LmF1ZGtlbm5pLmlzOjQ0My9zc28vb2F1dGgyL3JlYWxtcy9yb290L3JlYWxtcy9hdWRrZW5uaSIsInRva2VuTmFtZSI6ImFjY2Vzc190b2tlbiIsInRva2VuX3R5cGUiOiJCZWFyZXIiLCJhdXRoR3JhbnRJZCI6Inc5eUpXem1fMU04TGJqenplUnJQOUp3anZzSSIsImF1ZCI6Im15Q2liYUNsaWVudElkIiwibmJmIjoxNjExMTQzNDYzLCJncmFudF90eXBlIjoidXJuOm9wZW5pZDpwYXJhbXM6Z3JhbnQtdHlwZTpjaWJhIiwic2NvcGUiOlsiUkVMQVRFRFBBUlRZOk15T3duQ2xpZW50Iiwic2lnbmF0dXJlIiwib3BlbmlkIiwicHJvZmlsZSJdLCJhdXRoX3RpbWUiOjE2MTExNDM0NjMsInJlYWxtIjoiL2F1ZGtlbm5pIiwiZXhwIjoxNjExMTQ3MDYzLCJpYXQiOjE2MTExNDM0NjMsImV4cGlyZXNfaW4iOjM2MDAsImp0aSI6ImFqNzJuR0Y4ZElyclU2TFlZSlNhSjJ0bDNXNCJ9.k9AGl4MVncfmmq9USabdxlaIYlYC03tGtHPYYN-ImdiPDj8JIQYFwqR_lrQhJFClZgRtM2VrjARo4FDWshbZ8'

C# - RestSharp example of the call

Code Block
languagec#
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("Author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CwiYXVkaXRUcmFja2luZ0lkIjoiZWQ5NzcwMTgtOWMxYy00MDM3LWFkNTgtYzYxZGMyMjQ4MGE4LTExNDk2NjUiLCJpc3MiOiJodHRwczovL3Bmend3LmF1ZGtlbm5pLmlzOjQ0My9zc28vb2F1dGgyL3JlYWxtcy9yb290L3JlYWxtcy9hdWRrZW5uaSIsInRva2VuTmFtZSI6ImFjY2Vzc190b2tlbiIsInRva2VuX3R5cGUiOiJCZWFyZXIiLCJhdXRoR3JhbnRJZCI6Inc5eUpXem1fMU04TGJqenplUnJQOUp3anZzSSIsImF1ZCI6Im15Q2liYUNsaWVudElkIiwibmJmIjoxNjExMTQzNDYzLCJncmFudF90eXBlIjoidXJuOm9wZW5pZDpwYXJhbXM6Z3JhbnQtdHlwZTpjaWJhIiwic2NvcGUiOlsiUkVMQVRFRFBBUlRZOk15T3duQ2xpZW50Iiwic2lnbmF0dXJlIiwib3BlbmlkIiwicHJvZmlsZSJdLCJhdXRoX3RpbWUiOjE2MTExNDM0NjMsInJlYWxtIjoiL2F1ZGtlbm5pIiwiZXhwIjoxNjExMTQ3MDYzLCJpYXQiOjE2MTExNDM0NjMsImV4cGlyZXNfaW4iOjM2MDAsImp0aSI6ImFqNzJuR0Y4ZElyclU2TFlZSlNhSjJ0bDNXNCJ9.k9AGl4MVncfmmq9USabdxlaIYlYC03tGtHPYYN-ImdiPDj8JIQYFwqR_lrQhJFClZgRtM2VrjARo4FDWshbZ8");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

...

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

The signature contains a authentication signing certificate.

The REST API service answer is in JSON format.

...

Code Block
languagejson
{
    "signature": "MIIIdgYJKoZIhvcNAQcCoIIUZzCCCGMBAQExDTALBclghkgBZQMEAgEwXQYJMoZIhvcNAQcBoFAETgBBAHUAdABoAGUAbgB0AGkAYwBhAHQAaQBvAG4AIAB0AG8AIABBAHUA8ABrAGUAbgBuAGkAIAAtACAAQwBvAG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3TL5L38Ptjr2NVWOQaXSyEfjqbgzXRQkzaN5ufRCghTwRRMM9bqzei5dhPHDPIMwt4/nn5gH63Gzl1YDNs9mPcouofAxrAuEsXhxGQ+LOZKTjpdYB4iSvlianFxRWCqfpvZYkcRXz4fOePFJhcVT0pmXF10FeJ0k2chf4j9CWfeZsxaA0=",
    "documentNr": "na",
    "certificate": "na",
    "nationalRegisterId": "1406714889",
    "name": "Einar Helgi Hrafnsson",
    "sub": "10905f2e10935f1e-26182638-4f8c4f9c-80d2-3fb45241522c"
}