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:
-
PublicKeyCredentialUserEntityRepository
PublicKeyCredentialUserEntity
JdbcOperations
RowMapper
-
Constructor Summary
ConstructorsConstructorDescriptionJdbcPublicKeyCredentialUserEntityRepository
(org.springframework.jdbc.core.JdbcOperations jdbcOperations) Constructs aJdbcPublicKeyCredentialUserEntityRepository
using the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoid
findByUsername
(String username) Finds thePublicKeyCredentialUserEntity
by the username.void
save
(PublicKeyCredentialUserEntity userEntity) Saves thePublicKeyCredentialUserEntity
to the associated username.
-
Constructor Details
-
JdbcPublicKeyCredentialUserEntityRepository
public JdbcPublicKeyCredentialUserEntityRepository(org.springframework.jdbc.core.JdbcOperations jdbcOperations) Constructs aJdbcPublicKeyCredentialUserEntityRepository
using the provided parameters.- Parameters:
jdbcOperations
- the JDBC operations
-
-
Method Details
-
findById
Description copied from interface:PublicKeyCredentialUserEntityRepository
- Specified by:
findById
in interfacePublicKeyCredentialUserEntityRepository
- Parameters:
id
- the id to lookup the username by- Returns:
- the username or null if not found.
-
findByUsername
Description copied from interface:PublicKeyCredentialUserEntityRepository
Finds thePublicKeyCredentialUserEntity
by the username.- Specified by:
findByUsername
in interfacePublicKeyCredentialUserEntityRepository
- Parameters:
username
- the username to lookup thePublicKeyCredentialUserEntity
- Returns:
- the
PublicKeyCredentialUserEntity
or null if not found.
-
save
Description copied from interface:PublicKeyCredentialUserEntityRepository
Saves thePublicKeyCredentialUserEntity
to the associated username.- Specified by:
save
in interfacePublicKeyCredentialUserEntityRepository
- Parameters:
userEntity
- thePublicKeyCredentialUserEntity
to associate to the provided username. If null, any existing entry is deleted.
-
delete
- Specified by:
delete
in interfacePublicKeyCredentialUserEntityRepository
-