Class JdbcPasskeyRepository
java.lang.Object
com.irurueta.authserver.authorization.infrastructure.persistence.passkeys.JdbcPasskeyRepository
- All Implemented Interfaces:
PasskeyRepository
PasskeyRepository over the user_credentials and user_entities tables that Spring Security's
WebAuthn repositories own. It only reads them and renames or deletes a credential; registering one and updating its
signature counter stay with the framework.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final StringColumns of a credential, in the order the row mapper does not depend on.private static final StringStatement deleting a credential of a user.private static final StringQuery telling whether an account has at least one credential.private static final StringQuery returning one credential of a user.private static final StringQuery returning the credentials of a user.private static final StringQuery returning the user handle of an account.private final org.springframework.jdbc.core.simple.JdbcClientJDBC client used to run the statements.private final PasskeyRowMapperMaps a row to a passkey.private static final StringStatement renaming a credential of a user. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanexistsForAccount(UUID accountId) findByIdAndUserId(String id, String userId) findByUserId(String userId) findUserIdByUsername(String username) boolean
-
Field Details
-
COLUMNS
Columns of a credential, in the order the row mapper does not depend on.- See Also:
-
FIND_USER_ID_BY_USERNAME
Query returning the user handle of an account.- See Also:
-
FIND_BY_USER_ID
Query returning the credentials of a user.- See Also:
-
FIND_BY_ID_AND_USER_ID
Query returning one credential of a user.- See Also:
-
RENAME
Statement renaming a credential of a user.- See Also:
-
DELETE
Statement deleting a credential of a user.- See Also:
-
EXISTS_FOR_ACCOUNT
Query telling whether an account has at least one credential.- See Also:
-
jdbcClient
private final org.springframework.jdbc.core.simple.JdbcClient jdbcClientJDBC client used to run the statements. -
passkeyRowMapper
Maps a row to a passkey.
-
-
Constructor Details
-
JdbcPasskeyRepository
public JdbcPasskeyRepository()
-
-
Method Details
-
findUserIdByUsername
- Specified by:
findUserIdByUsernamein interfacePasskeyRepository
-
findByUserId
- Specified by:
findByUserIdin interfacePasskeyRepository
-
findByIdAndUserId
- Specified by:
findByIdAndUserIdin interfacePasskeyRepository
-
rename
- Specified by:
renamein interfacePasskeyRepository
-
delete
- Specified by:
deletein interfacePasskeyRepository
-
existsForAccount
- Specified by:
existsForAccountin interfacePasskeyRepository
-