Create Credential
POST /auth/credentials
Part of the flow Create Credential Regular flow.
Adds a new credential to a user's account. See Credential Kinds for all supported credential types.
User action signature required. See User Action Signing for more information.
Request headers required. See Request Headers for more information.
Authentication required. See Authentication Headers for more information.
Required Permissions
The permissions apply to the application only.
Name | Conditions |
---|---|
| Always Required |
Request body
Field | Type | Description |
---|---|---|
|
| Challenge identifier returned by the Create User Credential Challenge call |
|
| Name the user is assigning to this credential |
|
| Kind of credential being registered (see Credential Kind) |
|
| An object containing information about the credential being registered |
|
| Only for Password Protected Key and Recovery Key |
Fido2 Credential
|
| will always be |
|
| See fields below |
|
| base64url encoded id of the credential |
|
| base64url encoded client data object. The underlying object is the clientData object returned by the user's WebAuthn client |
|
| base64url encoded attestation data object. The underlying object is the attestationData object returned by the user's WebAuthn client |
Example
Key Credential
|
| will always be |
|
| See fields below |
|
| base64url encoded id of the credential. Note: This can be any unique value that identifies the credential (eg. account+key ID on AWS, the key's database ID, or the path to the key on disk) |
|
| base64url encoded Client Data JSON string object that was signed with the user's private key |
|
| base64url encoded Attestation Data JSON string object with the users signature and public key |
Example
Password Protected Key Credential
|
| will always be |
|
| See fields below |
|
| base64url encoded id of the credential. Note: This can be any unique value that identifies the credential (eg. account+key ID on AWS, the key's database ID, or the path to the key on disk) |
|
| base64url encoded Client Data JSON string object that was signed with the user's private key |
|
| base64url encoded Attestation Data JSON string object with the users signature and public key |
|
| Encrypted private key. The user should hold the secret to decrypting this value, and that secret should never be transmitted to Dfns |
Example
Recovery Credential
|
| will always be |
|
| See fields below |
|
| base64url encoded id of the credential |
|
| base64url encoded Client Data JSON string object that was signed with the user's private key |
|
| base64url encoded Attestation Data JSON string object with the users signature and public key |
|
| Encrypted private key. The user should hold the secret to decrypting this value, and that secret should never be transmitted to Dfns |
Example
Responses
See Common Errors for common errors.
See Credential Management Errors for credential management specific errors.
Success - an object describing the new credential
Last updated