Class JdbcPublicKeyCredentialUserEntityRepository
java.lang.Object
org.springframework.security.web.webauthn.management.JdbcPublicKeyCredentialUserEntityRepository
- All Implemented Interfaces:
PublicKeyCredentialUserEntityRepository
public final class JdbcPublicKeyCredentialUserEntityRepository
extends Object
implements PublicKeyCredentialUserEntityRepository
A JDBC implementation of an
PublicKeyCredentialUserEntityRepository that uses a
JdbcOperations for PublicKeyCredentialUserEntity persistence.
NOTE: This PublicKeyCredentialUserEntityRepository depends on the table
definition described in
"classpath:org/springframework/security/user-entities-schema.sql" and therefore MUST be
defined in the database schema.- Since:
- 6.5
- See Also:
-
PublicKeyCredentialUserEntityRepositoryPublicKeyCredentialUserEntityJdbcOperationsRowMapper
-
Constructor Summary
ConstructorsConstructorDescriptionJdbcPublicKeyCredentialUserEntityRepository(org.springframework.jdbc.core.JdbcOperations jdbcOperations) Constructs aJdbcPublicKeyCredentialUserEntityRepositoryusing the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoidfindByUsername(String username) Finds thePublicKeyCredentialUserEntityby the username.voidsave(PublicKeyCredentialUserEntity userEntity) Saves thePublicKeyCredentialUserEntityto the associated username.
-
Constructor Details
-
JdbcPublicKeyCredentialUserEntityRepository
public JdbcPublicKeyCredentialUserEntityRepository(org.springframework.jdbc.core.JdbcOperations jdbcOperations) Constructs aJdbcPublicKeyCredentialUserEntityRepositoryusing the provided parameters.- Parameters:
jdbcOperations- the JDBC operations
-
-
Method Details
-
findById
Description copied from interface:PublicKeyCredentialUserEntityRepository- Specified by:
findByIdin interfacePublicKeyCredentialUserEntityRepository- Parameters:
id- the id to lookup the username by- Returns:
- the username or null if not found.
-
findByUsername
Description copied from interface:PublicKeyCredentialUserEntityRepositoryFinds thePublicKeyCredentialUserEntityby the username.- Specified by:
findByUsernamein interfacePublicKeyCredentialUserEntityRepository- Parameters:
username- the username to lookup thePublicKeyCredentialUserEntity- Returns:
- the
PublicKeyCredentialUserEntityor null if not found.
-
save
Description copied from interface:PublicKeyCredentialUserEntityRepositorySaves thePublicKeyCredentialUserEntityto the associated username.- Specified by:
savein interfacePublicKeyCredentialUserEntityRepository- Parameters:
userEntity- thePublicKeyCredentialUserEntityto associate to the provided username. If null, any existing entry is deleted.
-
delete
- Specified by:
deletein interfacePublicKeyCredentialUserEntityRepository
-