Credential Source
Authenticator details and how to manage them
Credential Source Class
<?php
declare(strict_types=1);
use Webauthn\PublicKeyCredentialSource;
// After successful registration, you receive a PublicKeyCredentialSource object
$credentialSource = $authenticatorAttestationResponseValidator->check(
$authenticatorAttestationResponse,
$publicKeyCredentialCreationOptions,
'https://example.com'
);
// Access credential properties
$credentialId = $credentialSource->publicKeyCredentialId;
$userId = $credentialSource->userHandle;
$counter = $credentialSource->counter;
$transports = $credentialSource->transports; // ['usb', 'nfc']
// Get the descriptor for authentication
$descriptor = $credentialSource->getPublicKeyCredentialDescriptor();Credential Source Repository
Repository Example
Important Notes
Last updated
Was this helpful?