Callback
To Start
You will receive a json file from the web browser. It's need to be controlled before accepting the authentication.
The json file must have this structure :
The id is the id of the authenticator (credential.id
), the same you have saved after registration process.
First of all, instantiate the client and the RP has defined previously :
Process
Now, instantiate the authentication process :
authenticate::response(?string $json = null)
:
$json
:
must be the return of the client browser
If not set, the library force $json
with file_get_contents("php://input");
$response
is an array :
userHandle : the user.id saved in the device
credentialId : the id you get from the device after registration
credentialType : "public-key" in this contextode
You need to verify that the couple userHandle-credentialId is the same that you have in your database.
Validation
At this step, you need to give the jsonData saved in your database for the credentialId
return.
$validation
is a json string. You can save it in your dataBase to replace the previous jsonData from the registration. Example of the result :
Last updated