Overall process
Signing is a four-steps process:1
Get a challenge from the DFNS system.
A signing challenge is returned from a call to: Get a User Action ChallengeYou will receive an object with the following properties (additional properties exist for signing with WebAuthn):
2
Sign the challenge
This step differs depending on the type of credential you are using:
- Human users often use passkeys, with which the signing process is all managed by their OS and browser in the frontend (website, mobile app, etc).
- Machine users use asymmetric keys that you need to use in the backend with a crypto library.
allowCredentials.See the example flow below.3
Submit the User Action Signature to DFNS
Call the endpoint: Create User Action SignatureProvide the base64url-encoded signed challenge, the base64url-encoded client data, and the credential ID used to sign.You receive a User Action Token in return. This token is single-use.
4
Include the User Action Token in your API call
Pass the User Action Token as the
X-DFNS-USERACTION header on the actual request you needed to make.