Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
__construct (int $userId=0) | |
findOneByCredentialId (string $publicKeyCredentialId) | |
Fonctions membres publiques hérités de PublicKeyCredentialSourceRepository | |
findAllForUserEntity (PublicKeyCredentialUserEntity $publicKeyCredentialUserEntity) | |
saveCredentialSource (PublicKeyCredentialSource $publicKeyCredentialSource) | |
Fonctions membres privées | |
attestedCredentialToPublicKeyCredentialSource (AttestedCredentialData $record, int $userId) | |
Attributs privés | |
$userId = 0 | |
Implementation of the credentials repository for the WebAuthn library.
Important assumption: interaction with Webauthn through the library is only performed for the currently logged in user. Therefore all Methods which take a credential ID work by checking the Joomla MFA records of the current user only. This is a necessity. The records are stored encrypted, therefore we cannot do a partial search in the table. We have to load the records, decrypt them and inspect them. We cannot do that for thousands of records but we CAN do that for the few records each user has under their account.
This behavior can be changed by passing a user ID in the constructor of the class.
__construct | ( | int | $userId = 0 | ) |
CredentialRepository constructor.
int | $userId | The user ID this repository will be working with. |
Références $user, $userId, class, Factory\getApplication(), et Factory\getContainer().
|
private |
Converts a legacy AttestedCredentialData object stored in the database into a PublicKeyCredentialSource object.
This makes several assumptions which can be problematic and the reason why the WebAuthn library version 2 moved away from attested credentials to public key credential sources:
AttestedCredentialData | $record | Legacy attested credential data object |
int | $userId | User ID we are getting the credential source for |
Références $userId, PublicKeyCredentialDescriptor\AUTHENTICATOR_TRANSPORT_BLE, PublicKeyCredentialDescriptor\AUTHENTICATOR_TRANSPORT_INTERNAL, PublicKeyCredentialDescriptor\AUTHENTICATOR_TRANSPORT_NFC, PublicKeyCredentialDescriptor\AUTHENTICATOR_TRANSPORT_USB, PublicKeyCredentialDescriptor\CREDENTIAL_TYPE_PUBLIC_KEY, AttestedCredentialData\getAaguid(), AttestedCredentialData\getCredentialId(), AttestedCredentialData\getCredentialPublicKey(), et AttestationStatement\TYPE_NONE.
findOneByCredentialId | ( | string | $publicKeyCredentialId | ) |
Finds a WebAuthn record given a credential ID
string | $publicKeyCredentialId | The public credential ID to look for |
Returns a PublicKeyCredentialSource object given the public key credential ID
string | $publicKeyCredentialId | The identified of the public key credential we're searching for |
Implémente PublicKeyCredentialSourceRepository.
Références null.
|
private |