Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
__construct (ApplicationInterface $app=null, SessionInterface $session=null, PublicKeyCredentialSourceRepository $credRepo=null, ?MetadataStatementRepository $mdsRepo=null) | |
getKnownAuthenticators () | |
getCredentialsRepository () | |
getMetadataRepository () | |
getPubKeyCreationOptions (User $user) | |
getPubkeyRequestOptions (User $user) | |
validateAssertionResponse (string $data, User $user) | |
hasAttestationSupport () | |
setAttestationSupport (bool $attestationSupport) | |
Fonctions membres privées | |
getSiteIcon () | |
getUserEntity (User $user) | |
getAvatar (User $user, int $size=64) | |
getPubKeyDescriptorsForUser (User $user) | |
getPKCredentialRequestOptions () | |
getWebauthnServer () | |
Attributs privés | |
$credentialsRepository | |
$app | |
$session | |
$metadataRepository | |
$attestationSupport = true | |
Helper class to aid in credentials creation (link an authenticator to a user account)
__construct | ( | ApplicationInterface | $app = null , |
SessionInterface | $session = null , |
||
PublicKeyCredentialSourceRepository | $credRepo = null , |
||
?MetadataStatementRepository | $mdsRepo = null |
||
) |
Public constructor.
ApplicationInterface | null | $app | The app we are running in |
SessionInterface | null | $session | The app session object |
PublicKeyCredentialSourceRepository | null | $credRepo | Credentials repo |
MetadataStatementRepository | null | $mdsRepo | Authenticator metadata repo |
Références $app.
|
private |
Get the user's avatar (through Gravatar)
User | $user | The Joomla user object |
int | $size | The dimensions of the image to fetch (default: 64 pixels) |
Références $size, $user, et Uri\getInstance().
getCredentialsRepository | ( | ) |
Returns the Public Key credential source repository object
getKnownAuthenticators | ( | ) |
Get the known FIDO authenticators and their metadata
Références $image, $return, Text\_(), HTMLHelper\_(), JPATH_BASE, JPATH_ROOT, et Uri\root().
getMetadataRepository | ( | ) |
Returns the authenticator metadata repository object
|
private |
Retrieve the public key credential request options saved in the session.
If they do not exist or are corrupt it is a hacking attempt and we politely tell the attacker to go away.
Exception |
Références Text\_(), Log\add(), Log\NOTICE, et null.
getPubKeyCreationOptions | ( | User | $user | ) |
Generate the public key creation options.
This is used for the first step of attestation (key registration).
The PK creation options and the user ID are stored in the session.
Exception |
We will only ask for attestation information if our MDS is guaranteed not empty.
We check that by trying to load a known good AAGUID (Yubico Security Key NFC). If it's missing, we have failed to load the MDS data e.g. we could not contact the server, it was taking too long, the cache is unwritable etc. In this case asking for attestation conveyance would cause the attestation to fail (since we cannot verify its signature). Therefore we have to ask for no attestation to be conveyed. The downside is that in this case we do not have any information about the make and model of the authenticator. So be it! After all, that's a convenience feature for us.
Références $user, PublicKeyCredentialCreationOptions\ATTESTATION_CONVEYANCE_PREFERENCE_DIRECT, PublicKeyCredentialCreationOptions\ATTESTATION_CONVEYANCE_PREFERENCE_NONE, AuthenticatorSelectionCriteria\AUTHENTICATOR_ATTACHMENT_NO_PREFERENCE, et AuthenticatorSelectionCriteria\USER_VERIFICATION_REQUIREMENT_PREFERRED.
|
private |
getPubkeyRequestOptions | ( | User | $user | ) |
Get the public key request options.
This is used in the first step of the assertion (login) flow.
Exception |
Références $user, Log\add(), Log\DEBUG, et PublicKeyCredentialRequestOptions\USER_VERIFICATION_REQUIREMENT_PREFERRED.
|
private |
Try to find the site's favicon in the site's root, images, media, templates or current template directory.
Références $path, Uri\base(), JPATH_BASE, et null.
|
private |
|
private |
Get the WebAuthn library's Server object which facilitates WebAuthn operations
Exception |
Références Uri\getInstance().
hasAttestationSupport | ( | ) |
Get the authentiactor attestation support.
setAttestationSupport | ( | bool | $attestationSupport | ) |
Change the authenticator attestation support.
bool | $attestationSupport | The desired setting |
validateAssertionResponse | ( | string | $data, |
User | $user | ||
) |
Validate the authenticator assertion.
This is used in the second step of the assertion (login) flow. The server verifies that the assertion generated by the authenticator has not been tampered with.
string | $data | The data |
User | $user | The user we are trying to log in |
Exception |
Références $data, $user, Text\_(), Log\add(), ServerRequestFactory\fromGlobals(), Log\NOTICE, et null.
|
private |
|
private |
|
private |
|
private |
|
private |