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

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

 extractPublicKey (?string $publicKey)
 
 checkCertificate (string $publicKey)
 

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 FidoU2FAttestationStatementSupport 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

◆ checkCertificate()

checkCertificate ( string  $publicKey)
private
Paramètres
string$publicKeyObvious
Renvoie
void
Exceptions

PhpElementIsNotAvailableInCurrentPhpVersionInspection

Références class, Assertion\eq(), Assertion\isInstanceOf(), Assertion\isResource(), et Assertion\keyExists().

◆ extractPublicKey()

extractPublicKey ( ?string  $publicKey)
private
Paramètres
string | null$publicKeyObvious
Renvoie
string
Exceptions

Références class, Ec2Key\CURVE_P256, Ec2Key\DATA_CURVE, Assertion\isInstanceOf(), Assertion\notNull(), Assertion\true(), et Key\TYPE.

◆ 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, Assertion\eq(), AttestationStatement\get(), AuthenticatorData\getAttestedCredentialData(), AuthenticatorData\getRpIdHash(), 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(), Assertion\count(), AttestationStatement\createBasic(), 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 :