curl --request POST \
--url https://api.dfns.io/auth/recover/user \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recovery": {
"kind": "RecoveryKey",
"credentialAssertion": {
"credId": "<string>",
"clientData": "<string>",
"signature": "<string>",
"algorithm": "<string>"
}
},
"newCredentials": {
"firstFactorCredential": {
"credentialKind": "Fido2",
"credentialInfo": {
"credId": "<string>",
"clientData": "<string>",
"attestationData": "<string>"
},
"credentialName": "<string>",
"challengeIdentifier": "<string>"
},
"secondFactorCredential": {
"credentialKind": "Fido2",
"credentialInfo": {
"credId": "<string>",
"clientData": "<string>",
"attestationData": "<string>"
},
"credentialName": "<string>",
"challengeIdentifier": "<string>"
},
"recoveryCredential": {
"credentialKind": "RecoveryKey",
"credentialInfo": {
"credId": "<string>",
"clientData": "<string>",
"attestationData": "<string>"
},
"credentialName": "<string>",
"challengeIdentifier": "<string>",
"encryptedPrivateKey": "<string>"
}
}
}
'{
"credential": {
"uuid": "<string>",
"kind": "Fido2",
"name": "<string>"
},
"user": {
"id": "<string>",
"username": "<string>",
"orgId": "<string>"
}
}Recovers a user, using a recovery credential. After successfully recovering the user, all of the user’s previous credentials and personal access tokens will be invalidated.
This flow requires cryptographic validation of newly created credential(s) using a recovery credential. The recovery.credentialAssertion.clientData field’s challenge must be the base64url-encoded representation of the newCredential object.
The process is as follows:
newCredential object, using the challenge obtained from either the Create Recovery Challenge or Create Delegated Recovery Challenge endpoints.newCredential object to JSON and then base64url-encode the resulting JSON string. This base64url-encoded string will serve as the challenge for the recovery.credentialAssertion object.recovery.credentialAssertion object, using the base64url-encoded string generated in step 2 as its challenge.curl --request POST \
--url https://api.dfns.io/auth/recover/user \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recovery": {
"kind": "RecoveryKey",
"credentialAssertion": {
"credId": "<string>",
"clientData": "<string>",
"signature": "<string>",
"algorithm": "<string>"
}
},
"newCredentials": {
"firstFactorCredential": {
"credentialKind": "Fido2",
"credentialInfo": {
"credId": "<string>",
"clientData": "<string>",
"attestationData": "<string>"
},
"credentialName": "<string>",
"challengeIdentifier": "<string>"
},
"secondFactorCredential": {
"credentialKind": "Fido2",
"credentialInfo": {
"credId": "<string>",
"clientData": "<string>",
"attestationData": "<string>"
},
"credentialName": "<string>",
"challengeIdentifier": "<string>"
},
"recoveryCredential": {
"credentialKind": "RecoveryKey",
"credentialInfo": {
"credId": "<string>",
"clientData": "<string>",
"attestationData": "<string>"
},
"credentialName": "<string>",
"challengeIdentifier": "<string>",
"encryptedPrivateKey": "<string>"
}
}
}
'{
"credential": {
"uuid": "<string>",
"kind": "Fido2",
"name": "<string>"
},
"user": {
"id": "<string>",
"username": "<string>",
"orgId": "<string>"
}
}CustomerEmployee)EndUser)Bearer Token: Used to authenticate API requests. More details how to generate the token: Authentication flows
Was this page helpful?