Skip to content

CredentialRepository ​

Type
Class
Namespace
craft\auth\passkeys
Inherits
craft\auth\passkeys\CredentialRepository
Since
5.0.0

Passkey credential repository.

View source

Public Methods ​

MethodDescription
findAllForUserEntity()Finds all webauthn records for given user and returns an array of PublicKeyCredentialSources for their credential values.
findOneByCredentialId()Finds a webauthn record in the database for given id and returns the PublicKeyCredentialSource for its credential value.
saveCredentialSource()Saves credential source in the database
savedNamedCredentialSource()Save credential source with name

findAllForUserEntity() ​

Finds all webauthn records for given user and returns an array of PublicKeyCredentialSources for their credential values.

View source

Arguments ​

  • $publicKeyCredentialUserEntity

findOneByCredentialId() ​

Finds a webauthn record in the database for given id and returns the PublicKeyCredentialSource for its credential value.

View source

Arguments ​

  • $publicKeyCredentialId
  • $checkOldUserHandle

saveCredentialSource() ​

Saves credential source in the database

View source

Arguments ​

  • $publicKeyCredentialSource

savedNamedCredentialSource() ​

Save credential source with name

View source

Arguments ​

  • $publicKeyCredentialSource (\Webauthn\PublicKeyCredentialSource)
  • $credentialName (string, null)