Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe AndroidKeyAttestationStatementSupport
+ Graphe d'héritage de AndroidKeyAttestationStatementSupport:

Fonctions membres publiques

 __construct (?Decoder $decoder=null, ?MetadataStatementRepository $metadataStatementRepository=null)
 
 name ()
 
 load (array $attestation)
 
 isValid (string $clientDataJSONHash, AttestationStatement $attestationStatement, AuthenticatorData $authenticatorData)
 

Fonctions membres privées

 checkCertificateAndGetPublicKey (string $certificate, string $clientDataHash, AuthenticatorData $authenticatorData)
 

Attributs privés

 $decoder
 
 $metadataStatementRepository
 

Description détaillée

We had to fork the key attestation support object from the WebAuthn server package to address an issue with PHP 8.

We are currently using an older version of the WebAuthn library (2.x) which was written before PHP 8 was developed. We cannot upgrade the WebAuthn library to a newer major version because of Joomla's Semantic Versioning promise.

The AndroidKeyAttestationStatementSupport class forces an assertion on the result of the openssl_pkey_get_public() function, assuming it will return a resource. However, starting with PHP 8.0 this function returns an OpenSSLAsymmetricKey object and the assertion fails. As a result, you cannot use Android or FIDO U2F keys with WebAuthn.

The assertion check is in a private method, therefore we have to fork both attestation support class to change the assertion. The assertion takes place through a third party library we cannot (and should not!) modify.

Depuis
4.2.0
Obsolète:
5.0 We will upgrade the WebAuthn library to version 3 or later and this will go away.

Documentation des constructeurs et destructeur

◆ __construct()

__construct ( ?Decoder  $decoder = null,
?MetadataStatementRepository  $metadataStatementRepository = null 
)
Paramètres
Decoder | null$decoderObvious
MetadataStatementRepository | null$metadataStatementRepositoryObvious
Depuis
4.2.0

Références null.

Documentation des fonctions membres

◆ checkCertificateAndGetPublicKey()

checkCertificateAndGetPublicKey ( string  $certificate,
string  $clientDataHash,
AuthenticatorData  $authenticatorData 
)
private
Paramètres
string$certificateObvious
string$clientDataHashObvious
AuthenticatorData$authenticatorDataObvious
Renvoie
void
Exceptions

PhpElementIsNotAvailableInCurrentPhpVersionInspection

Références $extension, class, Key\createFromData(), Assertion\eq(), ASNObject\fromBinary(), AuthenticatorData\getAttestedCredentialData(), Assertion\isArray(), Assertion\isInstanceOf(), Assertion\isResource(), Assertion\keyExists(), Assertion\notNull(), et Assertion\true().

◆ isValid()

isValid ( string  $clientDataJSONHash,
AttestationStatement  $attestationStatement,
AuthenticatorData  $authenticatorData 
)
Paramètres
string$clientDataJSONHashObvious
AttestationStatement$attestationStatementObvious
AuthenticatorData$authenticatorDataObvious
Renvoie
boolean
Exceptions

Implémente AttestationStatementSupport.

Références CertificateToolbox\checkAttestationMedata(), class, AttestationStatement\get(), AuthenticatorData\getAttestedCredentialData(), AuthenticatorData\getAuthData(), Algorithms\getOpensslAlgorithmFor(), AttestationStatement\getTrustPath(), Assertion\isInstanceOf(), et null.

◆ load()

load ( array  $attestation)
Paramètres
array$attestationObvious
Renvoie
AttestationStatement
Exceptions

Implémente AttestationStatementSupport.

Références $key, CertificateToolbox\convertAllDERToPEM(), AttestationStatement\createBasic(), Assertion\greaterThan(), Assertion\isArray(), et Assertion\keyExists().

◆ name()

name ( )
Renvoie
string
Depuis
4.2.0

Implémente AttestationStatementSupport.

Documentation des champs

◆ $decoder

$decoder
private

◆ $metadataStatementRepository

$metadataStatementRepository
private

La documentation de cette classe a été générée à partir du fichier suivant :