Interface AuthenticatorRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Authenticator,
,Long> org.springframework.data.jpa.repository.JpaRepository<Authenticator,
,Long> org.springframework.data.repository.ListCrudRepository<Authenticator,
,Long> org.springframework.data.repository.ListPagingAndSortingRepository<Authenticator,
,Long> org.springframework.data.repository.PagingAndSortingRepository<Authenticator,
,Long> org.springframework.data.repository.query.QueryByExampleExecutor<Authenticator>
,org.springframework.data.repository.Repository<Authenticator,
Long>
@Repository
public interface AuthenticatorRepository
extends org.springframework.data.jpa.repository.JpaRepository<Authenticator,Long>
Repository interface for abstracting communication with the data layer related to
the Authenticator entity used for storing biometric login credentials
- Since:
- 28.4.24
- Version:
- 1.0
- Author:
- Yasin M.
-
Method Summary
Modifier and TypeMethodDescriptionfindAllByCredentialId
(com.yubico.webauthn.data.ByteArray credentialId) Finds a list of biometric entries using their credential id'sfindAllByUser
(User user) Finds all biometric entries for a userfindByCredentialId
(com.yubico.webauthn.data.ByteArray credentialId) Finds an Authenticator object using its credential id, if it existsvoid
removeAllByUser
(User user) Transactional statement used when removing all biometric entries of a user.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save
Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush
Methods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAll
Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAll
Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAll
Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findByCredentialId
Finds an Authenticator object using its credential id, if it exists- Parameters:
credentialId
- Byte array used to identify an Authenticator object- Returns:
- An Optional object, containing the Authenticator if it exists. Else, the optional contains nothing
-
findAllByUser
Finds all biometric entries for a user- Parameters:
user
- The user who's biometric registrations are being found- Returns:
- List of Authenticator objects
-
findAllByCredentialId
Finds a list of biometric entries using their credential id's- Parameters:
credentialId
- Byte array used to identify Authenticator objects- Returns:
- List of authenticator objects with matching credential id's
-
removeAllByUser
Transactional statement used when removing all biometric entries of a user. Rollbacks if this fails.- Parameters:
user
- User who's biometric entries are removed
-