The following example illustrates the transaction approval of an e-banking system that uses Airlock IAM for authentication and transaction approval with Airlock 2FA.
The offline QR code and the mobile-only variants are not shown in this example.
Flow diagram
(1) |
|
(2) |
|
(3) |
|
(4) |
|
(5) |
During step (5), the e-banking application may choose to show a QR code and accept an OTP code entered by the user (offline scenario). For simplicity, this is not shown in the diagram. |
REST call sequence
The following REST call sequence shows how to use the transaction approval API from a REST client's point of view.
For simplicity, in this example:
- ●authentication information (e.g. Basic Auth header) and other HTTP headers are not shown.
- ●the user's Airlock 2FA app is online and therefore capable to do One-Touch.
Step 1 - HTTP Request - User identifying step (Step 3 in above diagram)
POST https://internal-iam-host.com/auth-transaction-approval/rest/transaction-approval/user/identify/ { "username" : "jdoe" }
Step 1 - HTTP Response - User identifying step (Step 3 in above diagram)
HTTP/1.1 200 OK { "meta": { "type": "jsonapi.metadata.document", "timestamp": "2020-03-17T11:05:12.408+01:00" }, "data": { "type": "transaction-approval.session", "id": "121849797510425576", "attributes": { "nextStep": "PARAMETERS_REQUIRED" } } }
Step 2 - HTTP Request - Send transaction details (Step 4 in above diagram)
POST https://internal-iam-host.com/auth-transaction-approval/rest/transaction-approval/parameters/ { "authTokenId" : "123456abcdef", "messageParameters" : { "accountNumber" : "0123456", "amount" : "9999", "currency" : "CHF" } }
Step 2 - HTTP Response - Send transaction details (Step 4 in above diagram)
HTTP/1.1 200 OK { "meta": { "type": "jsonapi.metadata.document", "timestamp": "2020-03-17T11:05:15.185+01:00" }, "data": { "type": "transaction-approval.session", "id": "121849797510425576", "attributes": { "nextStep": "AIRLOCK_2FA_POLLING_OR_OTP_REQUIRED" } } }
Start polling for the result:
Step 3 - HTTP Request - Polling in approval step (Step 5 in above diagram)
POST https://internal-iam-host.com/auth-transaction-approval/rest/transaction-approval/airlock-2fa/status/poll/
Step 3 - HTTP Response - Polling in approval step (Step 5 in the above diagram)
HTTP/1.1 200 OK { "meta": { "type": "jsonapi.metadata.document", "timestamp": "2020-03-17T11:05:19.251+01:00" }, "data": { "type": "transaction-approval.session", "id": "121849797510425576", "attributes": { "nextStep": "AIRLOCK_2FA_POLLING_OR_OTP_REQUIRED" } } }
Keep polling until approved or denied.