WebAuthn — API
localzet\WebAuthn
Section titled “localzet\WebAuthn”function __construct(string $name, string $domain, array $allowedFormats = [], bool $useBase64UrlEncoding = false)
function createAuth(mixed $userId, string $userName, string $userDisplayName, array $excludeCredentialIds = [], int $timeout = 60, bool|string $requireResidentKey = false, bool|string $requireVerification = true, bool $crossPlatformAttachment = null): stdClass
function verifyAuth(array $allowCredentials, int $timeout = 60, bool|string $requireVerification = true): stdClass
function processCreate(string $clientDataJSON, string $attestationObject, ByteBuffer|string $challenge, bool $requireVerification = true, bool $requireUserPresent = true, bool $failIfRootMismatch = false, bool $requireCtsProfileMatch = false): array
function processGet(string $clientDataJSON, string $authenticatorData, string $signature, string $credentialPublicKey, ByteBuffer|string $challenge, int $prevSignatureCnt = null, bool $requireVerification = false, bool $requireUserPresent = true): bool
function getChallenge(): ByteBufferlocalzet\WebAuthn\Attestation\AttestationObject
Section titled “localzet\WebAuthn\Attestation\AttestationObject”src/WebAuthn/Attestation/AttestationObject.php
function __construct($binary, $allowedFormats)
function getAttestationFormatName(): string
function getAttestationFormat(): Format\FormatBase|Format\Tpm|Format\Apple|Format\Packed|Format\None|Format\AndroidKey|Format\AndroidSafetyNet|Format\U2f
function getAuthenticatorData(): AuthenticatorData
function getCertificateChain(): ?string
function getCertificateIssuer(): string
function getCertificateSubject(): string
function getCertificatePem(): ?string
function validateAttestation(string $clientDataHash): bool
function validateRootCertificate(array $rootCas): bool
function validateRpIdHash(string $rpIdHash): boollocalzet\WebAuthn\Attestation\AuthenticatorData
Section titled “localzet\WebAuthn\Attestation\AuthenticatorData”src/WebAuthn/Attestation/AuthenticatorData.php
function __construct(string $binary)
function getAAGUID(): string
function getBinary(): string
function getCredentialId(): string
function getPublicKeyPem(): string
function getPublicKeyU2F(): string
function getRpIdHash(): string
function getSignCount(): int
function getUserPresent(): bool
function getUserVerified(): boollocalzet\WebAuthn\Attestation\Format\AndroidKey
Section titled “localzet\WebAuthn\Attestation\Format\AndroidKey”src/WebAuthn/Attestation/Format/AndroidKey.php
function __construct($AttestionObject, AuthenticatorData $authenticatorData)
function getCertificatePem(): ?string
function validateAttestation(string $clientDataHash): bool
function validateRootCertificate(array $rootCas): boollocalzet\WebAuthn\Attestation\Format\AndroidSafetyNet
Section titled “localzet\WebAuthn\Attestation\Format\AndroidSafetyNet”src/WebAuthn/Attestation/Format/AndroidSafetyNet.php
function __construct($AttestionObject, AuthenticatorData $authenticatorData)
function ctsProfileMatch(): bool
function getCertificatePem(): ?string
function validateAttestation(string $clientDataHash): bool
function validateRootCertificate(array $rootCas): boollocalzet\WebAuthn\Attestation\Format\Apple
Section titled “localzet\WebAuthn\Attestation\Format\Apple”src/WebAuthn/Attestation/Format/Apple.php
function __construct($AttestionObject, AuthenticatorData $authenticatorData)
function getCertificatePem(): ?string
function validateAttestation(string $clientDataHash): bool
function validateRootCertificate(array $rootCas): boollocalzet\WebAuthn\Attestation\Format\FormatBase
Section titled “localzet\WebAuthn\Attestation\Format\FormatBase”src/WebAuthn/Attestation/Format/FormatBase.php
function __construct(array $AttestionObject, AuthenticatorData $authenticatorData)
function __destruct()
function getCertificateChain(): ?string
function getCertificatePem(): ?string
function validateAttestation(string $clientDataHash): bool
function validateRootCertificate(array $rootCas): boollocalzet\WebAuthn\Attestation\Format\None
Section titled “localzet\WebAuthn\Attestation\Format\None”src/WebAuthn/Attestation/Format/None.php
function __construct($AttestionObject, AuthenticatorData $authenticatorData)
function getCertificatePem(): ?string
function validateAttestation(string $clientDataHash): bool
function validateRootCertificate(array $rootCas): boollocalzet\WebAuthn\Attestation\Format\Packed
Section titled “localzet\WebAuthn\Attestation\Format\Packed”src/WebAuthn/Attestation/Format/Packed.php
function __construct($AttestionObject, AuthenticatorData $authenticatorData)
function getCertificatePem(): ?string
function validateAttestation(string $clientDataHash): bool
function validateRootCertificate(array $rootCas): boollocalzet\WebAuthn\Attestation\Format\Tpm
Section titled “localzet\WebAuthn\Attestation\Format\Tpm”src/WebAuthn/Attestation/Format/Tpm.php
function __construct($AttestionObject, AuthenticatorData $authenticatorData)
function getCertificatePem(): ?string
function validateAttestation(string $clientDataHash): bool
function validateRootCertificate(array $rootCas): boollocalzet\WebAuthn\Attestation\Format\U2f
Section titled “localzet\WebAuthn\Attestation\Format\U2f”src/WebAuthn/Attestation/Format/U2f.php
function __construct($AttestionObject, AuthenticatorData $authenticatorData)
function getCertificatePem(): ?string
function validateAttestation(string $clientDataHash): bool
function validateRootCertificate(array $rootCas): boollocalzet\WebAuthn\Binary\ByteBuffer
Section titled “localzet\WebAuthn\Binary\ByteBuffer”src/WebAuthn/Binary/ByteBuffer.php
function __construct($binaryData)
static function fromBase64Url(string $base64url): ByteBuffer
static function fromHex(string $hex): ByteBuffer
static function randomBuffer(string $length): ByteBuffer
function getBytes($offset, $length): string
function getByteVal($offset): int
function getJson($jsonFlags = 0)
function getLength(): int
function getUint16Val($offset)
function getUint32Val($offset)
function getUint64Val($offset)
function getHalfFloatVal($offset): float|int
function getFloatVal($offset)
function getDoubleVal($offset)
function getBinaryString(): string
function equals(ByteBuffer|string $buffer): bool
function getHex(): string
function isEmpty(): bool
function jsonSerialize(): string
function serialize(): string
function unserialize(string $serialized): void
function __serialize(): array
function __toString(): string
function __unserialize(array $data)localzet\WebAuthn\CBOR\CborDecoder
Section titled “localzet\WebAuthn\CBOR\CborDecoder”src/WebAuthn/CBOR/CborDecoder.php
static function decode(ByteBuffer|string $bufOrBin): mixed
static function decodeInPlace(ByteBuffer|string $bufOrBin, int $startOffset, int &$endOffset = null): mixed
const CBOR_MAJOR_UNSIGNED_INT
const CBOR_MAJOR_TEXT_STRING
const CBOR_MAJOR_FLOAT_SIMPLE
const CBOR_MAJOR_NEGATIVE_INT
const CBOR_MAJOR_ARRAY
const CBOR_MAJOR_TAG
const CBOR_MAJOR_MAP
const CBOR_MAJOR_BYTE_STRINGlocalzet\WebAuthn\Certs
Section titled “localzet\WebAuthn\Certs”function addRootCertificates(string $path, array $certFileExtensions = null): void
function queryFidoMetaDataService(string $certFolder, bool $deleteCerts = true): intlocalzet\WebAuthn\Exception
Section titled “localzet\WebAuthn\Exception”function __construct($message = "", $code = 0, $previous = null)
const INVALID_DATA
const INVALID_TYPE
const INVALID_CHALLENGE
const INVALID_ORIGIN
const INVALID_RELYING_PARTY
const INVALID_SIGNATURE
const INVALID_PUBLIC_KEY
const CERTIFICATE_NOT_TRUSTED
const USER_PRESENT
const USER_VERIFICATED
const SIGNATURE_COUNTER
const CRYPTO_STRONG
const BYTEBUFFER
const CBOR
const ANDROID_NOT_TRUSTED