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 Type
    Method
    Description
    findAllByCredentialId(com.yubico.webauthn.data.ByteArray credentialId)
    Finds a list of biometric entries using their credential id's
    Finds all biometric entries for a user
    findByCredentialId(com.yubico.webauthn.data.ByteArray credentialId)
    Finds an Authenticator object using its credential id, if it exists
    void
    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

      Optional<Authenticator> findByCredentialId(com.yubico.webauthn.data.ByteArray credentialId)
      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

      List<Authenticator> findAllByUser(User user)
      Finds all biometric entries for a user
      Parameters:
      user - The user who's biometric registrations are being found
      Returns:
      List of Authenticator objects
    • findAllByCredentialId

      List<Authenticator> findAllByCredentialId(com.yubico.webauthn.data.ByteArray credentialId)
      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 void removeAllByUser(User user)
      Transactional statement used when removing all biometric entries of a user. Rollbacks if this fails.
      Parameters:
      user - User who's biometric entries are removed