ReferenceAuthorization flows
A custom protocol provided by Idura. It allows interacting with eIDs that offer a poll-based workflow, where a user agent redirect is not required.
The Headless flow is an extension to OpenID Connect. The flow is very similar to CIBA but with a few key differences.
Just like in CIBA (and different from other OpenID Connect flows), there is a direct communication between your application and the OpenID Provider (Idura Verify), without redirects through the user's browser. However, CIBA requires that the user is known in advance so that a request may be sent directly to the authentication device. The Headless flow returns values to the relying party instead, so that they may trigger the necessary UI or interaction elements with the user directly.
Headless supports use cases not covered by other OpenID Connect flows, such as:
Idura Verify currently supports Headless Authentication for the Swedish BankID.
The client application sends an HTTP POST request to the backchannel authentication endpoint to ask for end-user authentication.
The Headless flow is only available for confidential clients, and the example below uses private key JWTs for client authentication.
HTTP POST https://YOUR_SUBDOMAIN.idura.broker/headless/authorize
Content-Type: application/x-www-form-urlencoded
scope=openid
&acr_values=urn:grn:authn:se:bankid
&client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer
&client_assertion=YOUR_JWT_ASSERTION
A successful response will contain the request id, headless_req_id:
HTTP/1.1 200 OK
Content-Type: application/json
{
"headless_req_id" : "3857f8ff-21b9-48ae-a732-a3bd8128a7ae",
"expires_in" : 120,
"acr_data": {... e-ID specific metadata ...}
}
Poll the token endpoint (/oauth2/token) providing the headless_req_id:
HTTP POST https://YOUR_DOMAIN.idura.broker/oauth2/token
Content-Type: application/x-www-form-urlencoded
headless_req_id=HEADLESS_REQ_ID
&grant_type=urn:grn:params:grant-type:headless
&client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer
&client_assertion=$client_assertion
While authentication is pending (non-normative):
HTTP/1.1 400 Bad Request
Content-Type: application/json
{
"error": "authorization_pending",
"error_description": "awaiting first user interaction",
"acr_data": {... e-ID specific metadata ...}
}
The token will be issued upon successful user identification:
HTTP/1.1 200 OK
Content-Type: application/json
{
"token_type": "Bearer",
"expires_in": 120,
"id_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjgyN0Q5Q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