User Tools

Site Tools


nocode:identity-link

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
nocode:identity-link [2019/08/13 05:22]
740803864
nocode:identity-link [2019/08/13 11:19]
740803864 [Positive response]
Line 1: Line 1:
 ====== Identity Link support ====== ====== Identity Link support ======
-You can follow these steps to integrate no-code transaction support to your application: +You can follow these steps to integrate no-code identity link support to your application: 
-  * Send transaction HTTP request to ADUCID Binder+  * Send identity link HTTP request to ADUCID Binder
   * Process authentication on ADUCID Binder   * Process authentication on ADUCID Binder
-  * Read transaction JSON response+  * Read identity link JSON response
 See chapters below for details. See chapters below for details.
  
-===== Set up ===== +===== Setup ===== 
-At first, transaction must be prepared and sent to ADUCID Binder. ADUCID Binder accepts transaction HTTP requests at ''/aducid-binder/prepareTransactionUpload''. Before ADUCID Binder call, **unique identifier (aka ''transactionId'') must be generated**. This identifier is neccessary to successfully pair transaction request and response. Let's see ADUCID Binder transaction interface parameters:+At first, identity link must be prepared and sent to ADUCID Binder. ADUCID Binder accepts identity link HTTP requests at ''/aducid-binder/prepareIdentityLinkUpload''. Before ADUCID Binder call, **unique identifier (aka ''identityLinkId'') must be generated**. This identifier is neccessary to successfully pair identity link request and response. Let's see ADUCID Binder identity link interface parameters:
 ^ Name ^ Values ^ Mandatory ^ Description ^ ^ Name ^ Values ^ Mandatory ^ Description ^
-transactionId | String | Yes | transaction unique identifier | +identityLinkId | String | Yes | identity link unique identifier 
-| peigMessage | MultipartFile | No | transaction message in plain or HTML format | +| remoteAims | List<String> | Yes | list of identity link remote AIMs 
-factor ''PERSONAL'' or ''COMFORT'' or empty value | No | required personal code level |+| peigMessage | MultipartFile | No | identity link message in plain or HTML format | 
 +peigMessageData MultipartFile | No | identity link message data | 
 +| initLF | Boolean | No | if true, personal code will be initialized |
 | redirectUrl | String | Yes | URL to redirect after ADUCID Binder successful authentication | | redirectUrl | String | Yes | URL to redirect after ADUCID Binder successful authentication |
 | errorPage | String | No | URL to redirect after ADUCID Binder unsuccessful authentication | | errorPage | String | No | URL to redirect after ADUCID Binder unsuccessful authentication |
 | udi | String | No | if defined, security attack check is realized | | udi | String | No | if defined, security attack check is realized |
-peigId | String | No | if defined, mobile push notification is realized +request | String | No | if defined, ''syncMyIdentityLinkedUserData'' method is called 
-**It is neccessary to add ''transactionId '' parameter to ''redirectUrl'' attribute** to successfully pair transaction request and response. If ''errorPage'' is not defined, ''redirectUrl'' is used in case of error. Now we can send prepared request to ''/aducid-binder/prepareTransactionUpload'' and check successful transaction upload (HTTP code 200).+**It is neccessary to add ''identityLinkId'' parameter to ''redirectUrl'' attribute** to successfully pair identity link request and response. If ''errorPage'' is not defined, ''redirectUrl'' is used in case of error. Now we can send prepared request to ''/aducid-binder/prepareIdentityLinkUpload'' and check successful identity link upload (HTTP code 200).
  
-We must also remember to provide generated transaction identifier to web view, e.g. Ajax JSON response or JSP expression language.+We must also remember to provide generated identity link identifier to web view, e.g. Ajax JSON response or JSP expression language.
  
-===== Transaction itself ===== +===== Identity link itself ===== 
-When transaction data are successfully uploaded, we can start transaction itself. It can be done with use of [[web-integration:client-side|Client API for Web Integration]]. We only need to specify ADUCID Binder methods to serve transaction:+When identity link data are successfully uploaded, we can start identity link itself. It can be done with use of [[web-integration:client-side|Client API for Web Integration]]. We only need to specify right ADUCID Binder methods to serve identity link:
  
 <code javascript> <code javascript>
-aducid.setStartOperationUrl("/aducid-binder/transactionJson?transactionId=" + response.data); +aducid.setStartOperationUrl("/aducid-binder/identityLinkJson?identityLinkId=" + response.data); 
-aducid.setResultOperationUrl("/aducid-binder/transactionCheck");+aducid.setResultOperationUrl("/aducid-binder/identityLinkCheck");
 aducid.setProxyUrl("/aducid-binder/proxy"); aducid.setProxyUrl("/aducid-binder/proxy");
 </code> </code>
  
-Expression ''response.data'' contains unique transaction identifier pushed from backend to view. After transaction run, user is redirected to ''redirectUrl'' value (or to ''errorPage'' if defined and error occurs).+Expression ''response.data'' contains unique identity link identifier pushed from backend to view. After identity link run, user is redirected to ''redirectUrl'' value (or to ''errorPage'' if defined and error occurs).
  
 ===== Response processing ===== ===== Response processing =====
-User is now redirected to ''redirectUrl'', where we must process transaction operation result. Operation result is saved in HTTP request attributes. We try to read attribute with prefix ''AAA_UTR_'' with transaction identifier at the end. When value exists, **we must invoke base64 decoding on value** to get readable JSON response.+User is now redirected to ''redirectUrl'', where we must process identity link operation result. Operation result is saved in HTTP request attributes. We try to read attribute with prefix ''AAA_ULR_'' with identity link identifier at the end. When value exists, **we must invoke base64 decoding on value** to get readable JSON response
 + 
 +There is also saved used remote AIM in HTTP attributes. It can be accessed as an attribute with prefix ''AAA_ULR_RA_'' with identity link identifier at the end. This value is saved as it is, it is not base64 encoded.
  
 ==== Positive response ==== ==== Positive response ====
-See +When identity link was successful (''status = OK''), JSON response will be:
-When transaction was successful (''status = OK''), JSON response will be:+
  
 <code javascript> <code javascript>
Line 46: Line 49:
 </code> </code>
  
-==== Negative response ==== +When ''request'' value was used in identity link setup (e.g''{"eidProviderMethod":"READ_EID_USER_DATA","data":null}''), ''data'' will be filled with service provider response. For example:
-Transaction can be also unsuccessful (''status = ERROR'')There are two types of failures - failure directly on AIM and second level failureFailure on AIM can be:+
  
 <code javascript> <code javascript>
 { {
-  "status": "ERROR",+  "status": "OK",
   "data": {   "data": {
-    "message": "Wrong personal factor.", +    "firstName": "John", 
-    "key": null+    "firstNameApproved": true
-    "arguments": null+    "lastName": "Green"
-    "statusAIM": "active", +    "lastNameApproved": true, 
-    "statusAuth": "OK", +    "permanentAddress": "Castle Road 54, Green Town, CF72 2YD", 
-    "statusLF": "KO"+    "permanentAddressApproved": true, 
 +    "identityCardNumber": "ID97967588", 
 +    "identityCardNumberApproved": true, 
 +    "identityCardValidTo": "2023-05-10", 
 +    "identityCardValidToApproved": true, 
 +    "birthDate": "1971-10-09", 
 +    "birthDateApproved": true, 
 +    "deliveryAddress": "Castle Road 54, Green Town, CF72 2YD", 
 +    "deliveryAddressApproved": true, 
 +    "telephoneNumber": "+44 654 987 987", 
 +    "telephoneNumberApproved": true, 
 +    "voter": true, 
 +    "voterApproved": true, 
 +    "creditCardNumber": "4485 5057 0701 1520", 
 +    "creditCardNumberApproved": true, 
 +    "creditCardValidTo": "09/2022", 
 +    "creditCardValidToApproved": true, 
 +    "creditCardOwner": "John Green", 
 +    "creditCardOwnerApproved": true, 
 +    "gender": "male", 
 +    "genderApproved": true, 
 +    "email": "john.green@test.com", 
 +    "emailApproved": true, 
 +    "approvedLF": true
 +    "proofingStatus": "APPROVED"
   },   },
-  "redirect": "https://dev-bank.demo.aducid.com:443/bank-nc/loginPage"+  "redirect": null
 } }
 </code> </code>
  
-In case of AIM failure, values ''statusAIM'' and ''statusAuth'' will be filled, ''statusLF'' only in case of personal code use. You can find ''statusAuth'' and ''statusLF'' meanings in chapter [[other:error-statuses|Error statuses of authentication process]]. Meanings of ''statusAIM'' can be found in [[other:aim-statuses|Semantics of individual statuses of the authentication session (AIMStatus)]] chapter. Attribute ''message'' is technical readable text describing error. +==== Negative response ==== 
- +See [[nocode:transactions#negative_response|Transaction support, Negative response]] chapter.
-Secondary level failure can look like: +
- +
-<code javascript> +
-+
-  "status": "ERROR", +
-  "data":+
-    "message": "Potential security attack.", +
-    "key": "web.potentialSecurityAttack", +
-    "arguments": [], +
-    "statusAIM": null, +
-    "statusAuth": null, +
-    "statusLF": null +
-  }, +
-  "redirect": "https://dev-bank.demo.aducid.com:443/bank-nc/paymentCheck?transactionId\u003dac39bc24-edc8-477d-95f5-6793a452bd80" +
-+
-</code> +
- +
-In this case, value ''key'' is filled, ''arguments'' only in situation of existing error message arguments. Possible values of ''key'' can be found at [[https://wiki.aducid.com/client-api/com/aducid/sdk/enums/ClientStatus.html|Client Status]] or [[https://wiki.aducid.com/web-platform/com/aducid/web/enums/WebStatus.html|Web Status]]. Attribute ''message'' is technical readable text describing error.+
  
nocode/identity-link.txt · Last modified: 2019/08/13 11:20 by 740803864