Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

(no description)

File Size: 423 lines (14 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: AuthenticatorData  - X-Ref


__construct($binary)   X-Ref
Parsing the authenticatorData binary.

param: string $binary

getAAGUID()   X-Ref
Authenticator Attestation Globally Unique Identifier, a unique number
that identifies the model of the authenticator (not the specific instance
of the authenticator)
The aaguid may be 0 if the user is using a old u2f device and/or if
the browser is using the fido-u2f format.

return: string

getBinary()   X-Ref
returns the authenticatorData as binary

return: string

getCredentialId()   X-Ref
returns the credentialId

return: string

getPublicKeyPem()   X-Ref
returns the public key in PEM format

return: string

getPublicKeyU2F()   X-Ref
returns the public key in U2F format

return: string

getRpIdHash()   X-Ref
returns the SHA256 hash of the relying party id (=hostname)

return: string

getSignCount()   X-Ref
returns the sign counter

return: int

getUserPresent()   X-Ref
returns true if the user is present

return: boolean

getUserVerified()   X-Ref
returns true if the user is verified

return: boolean

_getEc2Der()   X-Ref
Returns DER encoded EC2 key

return: string

_getRsaDer()   X-Ref
Returns DER encoded RSA key

return: string

_readFlags($binFlag)   X-Ref
reads the flags from flag byte

param: string $binFlag
return: \stdClass

_readAttestData($binary, &$endOffset)   X-Ref
read attested data

param: string $binary
param: int $endOffset
return: \stdClass

_readCredentialPublicKey($binary, $offset, &$endOffset)   X-Ref
reads COSE key-encoded elliptic curve public key in EC2 format

param: string $binary
param: int $endOffset
return: \stdClass

_readCredentialPublicKeyES256(&$credPKey, $enc)   X-Ref
extract ES256 informations from cose

param: \stdClass $credPKey
param: \stdClass $enc

_readCredentialPublicKeyRS256(&$credPKey, $enc)   X-Ref
extract RS256 informations from COSE

param: \stdClass $credPKey
param: \stdClass $enc

_readExtensionData($binary)   X-Ref
reads cbor encoded extension data.

param: string $binary
return: array

_der_length($len)   X-Ref
No description

_der_sequence($contents)   X-Ref
No description

_der_oid($encoded)   X-Ref
No description

_der_bitString($bytes)   X-Ref
No description

_der_nullValue()   X-Ref
No description

_der_unsignedInteger($bytes)   X-Ref
No description