Class CredentialStorage
java.lang.Object
io.vertx.reactivex.ext.auth.webauthn4j.CredentialStorage
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
Used to represent persistent storage of credentials, this gives you a way to abstract
how you want to store them (in memory, database, other).
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCredentialStorage(CredentialStorage delegate) CredentialStorage(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionbooleanFinds an existing list of credentials for a given user name and credential ID.inthashCode()static CredentialStorageFinds an existing list of credentials for a given user name and credential ID.rxStoreCredential(Authenticator authenticator) Persists a new credential, bound by its user name (may benull) and credential ID (cannot benull, must be unique).rxUpdateCounter(Authenticator authenticator) Updates a previously stored credential counter, as identified by its user name (may benull) and credential ID (cannot benull, must be unique).storeCredential(Authenticator authenticator) Persists a new credential, bound by its user name (may benull) and credential ID (cannot benull, must be unique).toString()updateCounter(Authenticator authenticator) Updates a previously stored credential counter, as identified by its user name (may benull) and credential ID (cannot benull, must be unique).
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
CredentialStorage
-
CredentialStorage
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
find
Finds an existing list of credentials for a given user name and credential ID. Both theuserNameandcredentialIdparameters are optional but at least one of them must be specified. If only one is specified, it must match the results. If both are specified, then both must match the result at the same time. This may return more than one element if one of the parameters is not set. If both are set, then the returned list of credentials must contain at maximum 1 element. If the user is not known or does not allow any authenticator, returns an empty list.- Parameters:
userName- the user name (may benull, but must match if specified)credentialId- the credential ID (must match the results)- Returns:
- the list of authenticators allowed for the given userName and credential ID, or an empty list.
-
rxFind
Finds an existing list of credentials for a given user name and credential ID. Both theuserNameandcredentialIdparameters are optional but at least one of them must be specified. If only one is specified, it must match the results. If both are specified, then both must match the result at the same time. This may return more than one element if one of the parameters is not set. If both are set, then the returned list of credentials must contain at maximum 1 element. If the user is not known or does not allow any authenticator, returns an empty list.- Parameters:
userName- the user name (may benull, but must match if specified)credentialId- the credential ID (must match the results)- Returns:
- the list of authenticators allowed for the given userName and credential ID, or an empty list.
-
storeCredential
Persists a new credential, bound by its user name (may benull) and credential ID (cannot benull, must be unique). If attempting to store a credential with acredIdthat is not unique, you should return a failedFuture. If attempting to store a credential with auserNamethat already exists, you should first make sure that the current user is already logged in under the sameuserName, because this will in practice add a new credential to identify the existing user, so this must be restricted to the already existing user, otherwise you will allow anyone to gain access to existing users. If attempting to store a credential with auserNamethat already exists, and the current user is not logged in, or the logged in user does not have the sameuserName, you should return a failedFuture.- Parameters:
authenticator- the new credential to persist- Returns:
- a future of nothing, or a failed future if the
credIdalready exists, or if theuserNamealready exists and does not represent the currently logged in user.
-
rxStoreCredential
Persists a new credential, bound by its user name (may benull) and credential ID (cannot benull, must be unique). If attempting to store a credential with acredIdthat is not unique, you should return a failedFuture. If attempting to store a credential with auserNamethat already exists, you should first make sure that the current user is already logged in under the sameuserName, because this will in practice add a new credential to identify the existing user, so this must be restricted to the already existing user, otherwise you will allow anyone to gain access to existing users. If attempting to store a credential with auserNamethat already exists, and the current user is not logged in, or the logged in user does not have the sameuserName, you should return a failedFuture.- Parameters:
authenticator- the new credential to persist- Returns:
- a future of nothing, or a failed future if the
credIdalready exists, or if theuserNamealready exists and does not represent the currently logged in user.
-
updateCounter
Updates a previously stored credential counter, as identified by its user name (may benull) and credential ID (cannot benull, must be unique).- Parameters:
authenticator- the credential to update- Returns:
- a future of nothing
-
rxUpdateCounter
Updates a previously stored credential counter, as identified by its user name (may benull) and credential ID (cannot benull, must be unique).- Parameters:
authenticator- the credential to update- Returns:
- a future of nothing
-
newInstance
-