CredentialRepository
class CredentialRepository implements PublicKeyCredentialSourceRepository, Serializable (View source)
Implements the required interface from the WebAuthn library - but it does not implement the repository pattern in the usual way. This is expected to be stored on a DataObject for persistence. Use the
Methods
No description
No description
No description
No description
No description
No description
No description
No description
No description
Empty the store deleting all stored credentials
Indicates the repository has changed and should be persisted (as this doesn't follow the actual repository pattern and is expected to be stored on a dataobject for persistence)
Provide the credentials stored in this repository as an array
Create an instance of a repository from the given credentials
No description
No description
The __unserialize() magic method will be automatically used instead of this almost all the time This method will be automatically used if existing serialized data was not saved as an associative array and the PHP version used in less than PHP 9.0
Details
__construct(string $memberID)
bool
has(string $credentialId)
AttestedCredentialData
get(string $credentialId)
string
getUserHandleFor(string $credentialId)
int
getCounterFor(string $credentialId)
void
updateCounterFor(string $credentialId, int $newCounter)
PublicKeyCredentialSource|null
findOneByCredentialId(string $publicKeyCredentialId)
array
findAllForUserEntity(PublicKeyCredentialUserEntity $publicKeyCredentialUserEntity)
void
saveCredentialSource(PublicKeyCredentialSource $publicKeyCredentialSource)
void
reset()
Empty the store deleting all stored credentials
bool
hasChanged()
Indicates the repository has changed and should be persisted (as this doesn't follow the actual repository pattern and is expected to be stored on a dataobject for persistence)
array
toArray()
Provide the credentials stored in this repository as an array
static CredentialRepository
fromArray(array $credentials, string $memberID)
Create an instance of a repository from the given credentials
array
__serialize()
void
__unserialize(array $data)
string
serialize()
deprecated
deprecated
The __serialize() magic method will be automatically used instead of this
unserialize(string $serialized)
deprecated
deprecated
The __unserialize() magic method will be automatically used instead of this almost all the time This method will be automatically used if existing serialized data was not saved as an associative array and the PHP version used in less than PHP 9.0