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 TypeMethodDescriptionvoiddeleteByCredentialId(String credentialId) Delete a credential by its WebAuthn credential ID.findByCredentialId(String credentialId) Find a credential by its WebAuthn credential ID (Base64URL encoded).findByUserId(Long userId) Find all credentials belonging to a user.findByUserIdAndRpId(Long userId, String rpId) 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, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor
count, count, delete, delete, exists, exists, findAll, findAll, findAll, findAll, findAll, findBy, findBy, findOne, findOne, updateMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAllMethods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findByCredentialId
Find a credential by its WebAuthn credential ID (Base64URL encoded).- Parameters:
credentialId- the credential ID- Returns:
- the credential or empty
-
findByUserId
Find all credentials belonging to a user.- Parameters:
userId- the user_id FK from the users table- Returns:
- list of credentials
-
findByUserIdAndRpId
Find all credentials belonging to a user for a specific Relying Party.- Parameters:
userId- the user_id FK from the users tablerpId- the Relying Party ID (domain)- Returns:
- list of credentials for that domain
-
deleteByCredentialId
Delete a credential by its WebAuthn credential ID.- Parameters:
credentialId- the credential ID
-