Please read on CIBA process and eIdent here: https://doc.ingroupe.com/developer/openid-connect#CIBA-flow
↔️ CIBA Flow for TrustID
Call the /ciba endpoint in eIdent with the appropriate parameters
curl -kiSs \
https://www.ident-preprod1.nets.eu/oidc/ciba \
-H Authorization: Basic <<Base64Enocoded username:password>> \
-d scope=openid profile \
-d amr_values=trustid:pin \
-d binding_message=ICB7CiAgInJlcX…..Cg== (see description below)
|
Parameter |
Description |
|---|---|
|
Authorization |
This is basic http authentication. Base64Enocoded of <<username:password>> for the connection to eIdent |
|
scope |
This determines the information you will be getting in the idToken and the UserInfo end point when authentication is completed.
The “openid” scope will provide you with the user’s TrustID ( “pid”) upon successful authentication. If “pid” parameter is notr present then the authentication has failed.
We recommend that you initiate the CIBA flow with scope=”openid profile” |
|
amr_values |
It denotes to eIdent
The actual used authentication method will be returned in the amr claim/attribute of the ID Token Examples:
|
|
binding_message |
It is a base64 encoded json. Please see description in the table below |
memo Binding Message
The binding message payload looks like this:
{
"action_context": "authentication"
"appId": "0001",
"bindingMessage": "Approve transaction of 100 Euro to Amazon.com with cardnr:xxxx.xxxx.xxxx.1234?"
"userStatus":"active"
}
|
Parameter |
|
Description |
|---|---|---|
|
action_context |
obligatory |
It can be either "authentication” or “provisioning”.
|
|
appId |
Obligatory when "action_context” = provisioning", otherwise optional |
This is a configurable parameter which you will be getting from us upon configuration on our side of your app that will be using the SDK.
|
|
bindingMessage |
Obligatory only for a consent |
This is a text that will be presented directly to the user. It provides the context for the authentication (or validation). It will be presented “As Is” so you chose the language and the text. It is an obligatory parameter. It is also a required element according to PSD2 regulation |
|
userStatus |
optional when "action_context= provisioning" Not allowed on action_context=authentication |
This is relevant ONLY when "action_context=provisioning".
|
The binding message JSON, should be base64 encoded and passed on as “binding_message” parameter in the call. When encoded, the result is:
ICB7CiAgInJlcXVlc3RUeXBlIjogImF1dGhlbnRpY2F0aW9uIiAKICAiYXBwSWQiOiAiMDAwMSIsCiAgImJpbmRpbmdNZXNzYWdlIjogIkFwcHJvdmUgdHJhbnNhY3Rpb24gb2YgMTAwIEV1cm8gdG8gQW1hem9uLmNvbSB3aXRoIGNhcmRucjp4eHh4Lnh4eHgueHh4eC4xMjM0PyIsIAogICJ1c2VyU3RhdHVzIjoiYWN0aXZlIgp9Cg==
This is what will be posted to the CIBA endpoint using the following command:
curl --location --request POST 'https://www-ident-test.nets.no/oidc/ciba?amr_values=trustid&scope=openid profile&binding_message=ICB7CiAgInJlcXVlc3RUeXBlIjogImF1dGhlbnRpY2F0aW9uIiAKICAiYXBwSWQiOiAiMDAwMSIsCiAgImJpbmRpbmdNZXNzYWdlIjogIkFwcHJvdmUgdHJhbnNhY3Rpb24gb2YgMTAwIEV1cm8gdG8gQW1hem9uLmNvbSB3aXRoIGNhcmRucjp4eHh4Lnh4eHgueHh4eC4xMjM0PyIsIAogICJ1c2VyU3RhdHVzIjoiYWN0aXZlIgp9Cg==' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic encodedcredentials'
↔️ Response of the /ciba end point
The server response expected will look like this:
{
"auth_req_id":"7d080d66b23e4ec1ad9ea1a238e741ef",
"interval":2,
"expires_in":600
}
|
Parameter |
Description |
|
auth_req_id |
An identifier for this process. |
|
interval |
Polling interval as “seconds” |
|
expires_in |
Number of seconds |