CredentialRepository
class CredentialRepository implements PublicKeyCredentialSourceRepository (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
Assert that the given credential ID matches a stored credential
No description
No description
No description
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)
Set the credentials in bulk (for internal use) ensuring that credential objects are initialised correctly
Create a reference to be used as a key for the credentials in the array
Create an instance of a repository from the given credentials
Details
__construct(string $memberID)
No description
bool
has(string $credentialId)
No description
AttestedCredentialData
get(string $credentialId)
No description
string
getUserHandleFor(string $credentialId)
No description
int
getCounterFor(string $credentialId)
No description
void
updateCounterFor(string $credentialId, int $newCounter)
No description
protected void
assertCredentialID(string $credentialId)
Assert that the given credential ID matches a stored credential
PublicKeyCredentialSource|null
findOneByCredentialId(string $publicKeyCredentialId)
No description
array
findAllForUserEntity(PublicKeyCredentialUserEntity $publicKeyCredentialUserEntity)
No description
void
saveCredentialSource(PublicKeyCredentialSource $publicKeyCredentialSource)
No description
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)
protected void
setCredentials(array $credentials)
Set the credentials in bulk (for internal use) ensuring that credential objects are initialised correctly
protected string
getCredentialIDRef(string $credentialID)
Create a reference to be used as a key for the credentials in the array
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()
No description
void
__unserialize(array $data)
No description