Authentification
How to log in to the system with an employee credentials
Last updated
How to log in to the system with an employee credentials
Last updated
In order to work with DCM you should be authenticated and authorized in the system.
A JWT token signed by bank's key accompanies every request to API (step 1).
Additional step 3 is used to authorize the request by bank.
Below an example for customer registration is depicted.
At step 8 the bank is able to validate if the value in X-Session-ID
is signed by the DCM key.
Later at step 7 DCM prepares its own JWT and sends it to Bank API endpoint /user_auth in a header X-Session-ID
.
At step 6 DCM validates the JWT.
As you can see, at step 2 Bank generates a JWT (in blue) that is sent at step 5 in a header CX-Authorization
.
Steps 3-4 are optional and can be used to check if the JWT is valid.
Initial JWK is uploaded into the system during onboarding (see ). Once your key is about to expire, please register the new JWK key for your counterparty.
The endpoint allows you to check your own JWT in our authentication service.
The endpoint allows you to get a DCM public key. So, you will be able to check a JWT signed by DCM.
JWT is used for all 3 methods in header X-Session-ID
to specify "who" (subject) intends to do with "what" (object). The content of JWT must by signed with a bank's private key.
An example of a JWT payload:
An example of a JWT payload:
So, when a callback is received on bank's side, it is possible for your systems to check a signature, object and subject that you placed into an initial request to API methods of TPN.
Example of a full signed JWT:
If all the checks pass on your side, a successful response (see details below) should be sent. Otherwise an HTTP 401 (Unauthorized) is expected.
3 API methods on Bank's side are required to share the account ownership between Bank and DCM.
GET
/user_auth
user data
GET
/key
user secret key
GET
/external_id
authentication
Request example:
Response example:
Attributes external_id
, key
and phone
are obligatory in response.
Request example:
Response example:
Request example:
Response example:
The content can be decoded .