Interface PasskeyCredentialRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<PasskeyCredentialEntity,Long>, org.springframework.data.jpa.repository.JpaRepository<PasskeyCredentialEntity,Long>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<PasskeyCredentialEntity>, org.springframework.data.repository.ListCrudRepository<PasskeyCredentialEntity,Long>, org.springframework.data.repository.ListPagingAndSortingRepository<PasskeyCredentialEntity,Long>, org.springframework.data.repository.PagingAndSortingRepository<PasskeyCredentialEntity,Long>, org.springframework.data.repository.query.QueryByExampleExecutor<PasskeyCredentialEntity>, org.springframework.data.repository.Repository<PasskeyCredentialEntity,Long>

@Repository public interface PasskeyCredentialRepository extends org.springframework.data.jpa.repository.JpaRepository<PasskeyCredentialEntity,Long>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<PasskeyCredentialEntity>
Spring DATA repository for PasskeyCredentialEntity (passkey_credentials table). Provides CRUD operations and custom finders for WebAuthn credential management.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor

    org.springframework.data.jpa.repository.JpaSpecificationExecutor.SpecificationFluentQuery<T extends Object>
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Delete a credential by its WebAuthn credential ID.
    findByCredentialId(String credentialId)
    Find a credential by its WebAuthn credential ID (Base64URL encoded).
    Find all credentials belonging to a user.
    Find all credentials belonging to a user for a specific Relying Party.

    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.jpa.repository.JpaSpecificationExecutor

    count, count, delete, delete, exists, exists, findAll, findAll, findAll, findAll, findAll, findBy, findBy, findOne, findOne, update

    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<PasskeyCredentialEntity> findByCredentialId(String credentialId)
      Find a credential by its WebAuthn credential ID (Base64URL encoded).
      Parameters:
      credentialId - the credential ID
      Returns:
      the credential or empty
    • findByUserId

      List<PasskeyCredentialEntity> findByUserId(Long userId)
      Find all credentials belonging to a user.
      Parameters:
      userId - the user_id FK from the users table
      Returns:
      list of credentials
    • findByUserIdAndRpId

      List<PasskeyCredentialEntity> findByUserIdAndRpId(Long userId, String rpId)
      Find all credentials belonging to a user for a specific Relying Party.
      Parameters:
      userId - the user_id FK from the users table
      rpId - the Relying Party ID (domain)
      Returns:
      list of credentials for that domain
    • deleteByCredentialId

      void deleteByCredentialId(String credentialId)
      Delete a credential by its WebAuthn credential ID.
      Parameters:
      credentialId - the credential ID