Class JdbcPublicKeyCredentialUserEntityRepository
java.lang.Object
com.codename1.backend.security.webauthn.JdbcPublicKeyCredentialUserEntityRepository
- All Implemented Interfaces:
PublicKeyCredentialUserEntityRepository
public final class JdbcPublicKeyCredentialUserEntityRepository
extends Object
implements PublicKeyCredentialUserEntityRepository
User handles kept in the server's database, in the cn1_webauthn_user
table of SecuritySchema.
The table is keyed by the user's name and the handle is unique in it, so a
user has one handle and a handle one user, whatever arrives at once: the
first to store a name wins, and save(PublicKeyCredentialUserEntity) answers what the first stored.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(byte[] id) Forgets the user with this handle.findById(byte[] id) The user with this handle, or null.findByUsername(String username) The user of this name, or null.Storesuser, unless a user of that name is there already.voidThe clock a row's creation time is read from; for tests.
-
Constructor Details
-
JdbcPublicKeyCredentialUserEntityRepository
-
-
Method Details
-
setClock
The clock a row's creation time is read from; for tests. -
findById
Description copied from interface:PublicKeyCredentialUserEntityRepositoryThe user with this handle, or null.- Specified by:
findByIdin interfacePublicKeyCredentialUserEntityRepository
-
findByUsername
Description copied from interface:PublicKeyCredentialUserEntityRepositoryThe user of this name, or null. Names differing only in the case ofAtoZare the same user.- Specified by:
findByUsernamein interfacePublicKeyCredentialUserEntityRepository
-
save
Description copied from interface:PublicKeyCredentialUserEntityRepositoryStoresuser, unless a user of that name is there already.- Specified by:
savein interfacePublicKeyCredentialUserEntityRepository- Returns:
- the user of that name as stored:
user, or the one that was there first -- whose handle is then the one to use
-
delete
public void delete(byte[] id) Description copied from interface:PublicKeyCredentialUserEntityRepositoryForgets the user with this handle. Their credentials are another repository's to remove.- Specified by:
deletein interfacePublicKeyCredentialUserEntityRepository
-