Class InMemoryRegistrationStorage
java.lang.Object
com.jadaptive.webauthn.server.storage.InMemoryRegistrationStorage
- All Implemented Interfaces:
com.jadaptive.webauthn.server.storage.RegistrationStorage,com.yubico.webauthn.CredentialRepository
@Component
public class InMemoryRegistrationStorage
extends Object
implements com.jadaptive.webauthn.server.storage.RegistrationStorage
Simple in memory storage implementation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddRegistrationByUsername(String username, com.jadaptive.webauthn.server.model.CredentialRegistration reg) Set<com.yubico.webauthn.data.PublicKeyCredentialDescriptor>getCredentialIdsForUsername(String username) Optional<com.jadaptive.webauthn.server.model.CredentialRegistration>getRegistrationByUsernameAndCredentialId(String username, com.yubico.webauthn.data.ByteArray id) Collection<com.jadaptive.webauthn.server.model.CredentialRegistration>getRegistrationsByUserHandle(com.yubico.webauthn.data.ByteArray userHandle) Collection<com.jadaptive.webauthn.server.model.CredentialRegistration>getRegistrationsByUsername(String username) Optional<com.yubico.webauthn.data.ByteArray>getUserHandleForUsername(String username) getUsernameForUserHandle(com.yubico.webauthn.data.ByteArray userHandle) Optional<com.yubico.webauthn.RegisteredCredential>lookup(com.yubico.webauthn.data.ByteArray credentialId, com.yubico.webauthn.data.ByteArray userHandle) Set<com.yubico.webauthn.RegisteredCredential>lookupAll(com.yubico.webauthn.data.ByteArray credentialId) booleanremoveAllRegistrations(String username) booleanremoveRegistrationByUsername(String username, com.jadaptive.webauthn.server.model.CredentialRegistration credentialRegistration) voidupdateSignatureCount(com.yubico.webauthn.AssertionResult result) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jadaptive.webauthn.server.storage.RegistrationStorage
userExists
-
Constructor Details
-
InMemoryRegistrationStorage
public InMemoryRegistrationStorage()
-
-
Method Details
-
addRegistrationByUsername
public boolean addRegistrationByUsername(String username, com.jadaptive.webauthn.server.model.CredentialRegistration reg) - Specified by:
addRegistrationByUsernamein interfacecom.jadaptive.webauthn.server.storage.RegistrationStorage
-
getCredentialIdsForUsername
public Set<com.yubico.webauthn.data.PublicKeyCredentialDescriptor> getCredentialIdsForUsername(String username) - Specified by:
getCredentialIdsForUsernamein interfacecom.yubico.webauthn.CredentialRepository
-
getRegistrationsByUsername
public Collection<com.jadaptive.webauthn.server.model.CredentialRegistration> getRegistrationsByUsername(String username) - Specified by:
getRegistrationsByUsernamein interfacecom.jadaptive.webauthn.server.storage.RegistrationStorage
-
getRegistrationsByUserHandle
public Collection<com.jadaptive.webauthn.server.model.CredentialRegistration> getRegistrationsByUserHandle(com.yubico.webauthn.data.ByteArray userHandle) - Specified by:
getRegistrationsByUserHandlein interfacecom.jadaptive.webauthn.server.storage.RegistrationStorage
-
getUsernameForUserHandle
- Specified by:
getUsernameForUserHandlein interfacecom.yubico.webauthn.CredentialRepository
-
getUserHandleForUsername
- Specified by:
getUserHandleForUsernamein interfacecom.yubico.webauthn.CredentialRepository
-
updateSignatureCount
public void updateSignatureCount(com.yubico.webauthn.AssertionResult result) - Specified by:
updateSignatureCountin interfacecom.jadaptive.webauthn.server.storage.RegistrationStorage
-
getRegistrationByUsernameAndCredentialId
public Optional<com.jadaptive.webauthn.server.model.CredentialRegistration> getRegistrationByUsernameAndCredentialId(String username, com.yubico.webauthn.data.ByteArray id) - Specified by:
getRegistrationByUsernameAndCredentialIdin interfacecom.jadaptive.webauthn.server.storage.RegistrationStorage
-
removeRegistrationByUsername
public boolean removeRegistrationByUsername(String username, com.jadaptive.webauthn.server.model.CredentialRegistration credentialRegistration) - Specified by:
removeRegistrationByUsernamein interfacecom.jadaptive.webauthn.server.storage.RegistrationStorage
-
removeAllRegistrations
- Specified by:
removeAllRegistrationsin interfacecom.jadaptive.webauthn.server.storage.RegistrationStorage
-
lookup
public Optional<com.yubico.webauthn.RegisteredCredential> lookup(com.yubico.webauthn.data.ByteArray credentialId, com.yubico.webauthn.data.ByteArray userHandle) - Specified by:
lookupin interfacecom.yubico.webauthn.CredentialRepository
-
lookupAll
public Set<com.yubico.webauthn.RegisteredCredential> lookupAll(com.yubico.webauthn.data.ByteArray credentialId) - Specified by:
lookupAllin interfacecom.yubico.webauthn.CredentialRepository
-