Class WebAuthn
- java.lang.Object
-
- io.vertx.reactivex.ext.auth.authentication.AuthenticationProvider
-
- io.vertx.reactivex.ext.auth.webauthn.WebAuthn
-
public class WebAuthn extends AuthenticationProvider
Factory interface for creating WebAuthN basedAuthenticationProvider
instances. NOTE: This class has been automatically generated from theoriginal
non RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<WebAuthn>
__TYPE_ARG
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description WebAuthn
authenticatorFetcher(io.reactivex.functions.Function<Authenticator,io.reactivex.Single<List<Authenticator>>> fetcher)
Provide a that can fetchAuthenticator
s from a backend given the incompleteAuthenticator
argument.WebAuthn
authenticatorFetcher(Function<Authenticator,Future<List<Authenticator>>> fetcher)
Provide a that can fetchAuthenticator
s from a backend given the incompleteAuthenticator
argument.WebAuthn
authenticatorUpdater(io.reactivex.functions.Function<Authenticator,io.reactivex.Completable> updater)
Provide a that can update or insert aAuthenticator
.WebAuthn
authenticatorUpdater(Function<Authenticator,Future<Void>> updater)
Provide a that can update or insert aAuthenticator
.static WebAuthn
create(Vertx vertx)
Create a WebAuthN auth providerstatic WebAuthn
create(Vertx vertx, WebAuthnOptions options)
Create a WebAuthN auth providerWebAuthn
createCredentialsOptions(JsonObject user)
Gets a challenge and any other parameters for thenavigator.credentials.create()
call.WebAuthn
createCredentialsOptions(JsonObject user, Handler<AsyncResult<JsonObject>> handler)
Gets a challenge and any other parameters for thenavigator.credentials.create()
call.boolean
equals(Object o)
WebAuthn
getCredentialsOptions(String name)
Creates an assertion challenge and any other parameters for thenavigator.credentials.get()
call.WebAuthn
getCredentialsOptions(String name, Handler<AsyncResult<JsonObject>> handler)
Creates an assertion challenge and any other parameters for thenavigator.credentials.get()
call.WebAuthn
getDelegate()
int
hashCode()
MetaDataService
metaDataService()
Getter to the instance FIDO2 Meta Data Service.static WebAuthn
newInstance(WebAuthn arg)
io.reactivex.Single<JsonObject>
rxCreateCredentialsOptions(JsonObject user)
Gets a challenge and any other parameters for thenavigator.credentials.create()
call.io.reactivex.Single<JsonObject>
rxGetCredentialsOptions(String name)
Creates an assertion challenge and any other parameters for thenavigator.credentials.get()
call.String
toString()
-
Methods inherited from class io.vertx.reactivex.ext.auth.authentication.AuthenticationProvider
authenticate, authenticate, authenticate, authenticate, newInstance, rxAuthenticate, rxAuthenticate
-
-
-
-
Method Detail
-
toString
public String toString()
- Overrides:
toString
in classAuthenticationProvider
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classAuthenticationProvider
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAuthenticationProvider
-
getDelegate
public WebAuthn getDelegate()
- Overrides:
getDelegate
in classAuthenticationProvider
-
create
public static WebAuthn create(Vertx vertx)
Create a WebAuthN auth provider- Parameters:
vertx
- the Vertx instance.- Returns:
- the auth provider.
-
create
public static WebAuthn create(Vertx vertx, WebAuthnOptions options)
Create a WebAuthN auth provider- Parameters:
vertx
- the Vertx instance.options
- the custom options to the provider.- Returns:
- the auth provider.
-
createCredentialsOptions
public WebAuthn createCredentialsOptions(JsonObject user, Handler<AsyncResult<JsonObject>> handler)
Gets a challenge and any other parameters for thenavigator.credentials.create()
call. The object being returned is described here https://w3c.github.io/webauthn/#dictdef-publickeycredentialcreationoptions- Parameters:
user
- - the user object with name and optionally displayName and iconhandler
- server encoded make credentials request- Returns:
- fluent self
-
createCredentialsOptions
public WebAuthn createCredentialsOptions(JsonObject user)
Gets a challenge and any other parameters for thenavigator.credentials.create()
call. The object being returned is described here https://w3c.github.io/webauthn/#dictdef-publickeycredentialcreationoptions- Parameters:
user
- - the user object with name and optionally displayName and icon- Returns:
- fluent self
-
rxCreateCredentialsOptions
public io.reactivex.Single<JsonObject> rxCreateCredentialsOptions(JsonObject user)
Gets a challenge and any other parameters for thenavigator.credentials.create()
call. The object being returned is described here https://w3c.github.io/webauthn/#dictdef-publickeycredentialcreationoptions- Parameters:
user
- - the user object with name and optionally displayName and icon- Returns:
- fluent self
-
getCredentialsOptions
public WebAuthn getCredentialsOptions(String name, Handler<AsyncResult<JsonObject>> handler)
Creates an assertion challenge and any other parameters for thenavigator.credentials.get()
call. If the auth provider is configured withRequireResidentKey
and the username is null then the generated assertion will be a RK assertion (Usernameless). The object being returned is described here https://w3c.github.io/webauthn/#dictdef-publickeycredentialcreationoptions- Parameters:
name
- the unique user identifiedhandler
- server encoded get assertion request- Returns:
- fluent self.
-
getCredentialsOptions
public WebAuthn getCredentialsOptions(String name)
Creates an assertion challenge and any other parameters for thenavigator.credentials.get()
call. If the auth provider is configured withRequireResidentKey
and the username is null then the generated assertion will be a RK assertion (Usernameless). The object being returned is described here https://w3c.github.io/webauthn/#dictdef-publickeycredentialcreationoptions- Parameters:
name
- the unique user identified- Returns:
- fluent self.
-
rxGetCredentialsOptions
public io.reactivex.Single<JsonObject> rxGetCredentialsOptions(String name)
Creates an assertion challenge and any other parameters for thenavigator.credentials.get()
call. If the auth provider is configured withRequireResidentKey
and the username is null then the generated assertion will be a RK assertion (Usernameless). The object being returned is described here https://w3c.github.io/webauthn/#dictdef-publickeycredentialcreationoptions- Parameters:
name
- the unique user identified- Returns:
- fluent self.
-
authenticatorFetcher
public WebAuthn authenticatorFetcher(Function<Authenticator,Future<List<Authenticator>>> fetcher)
Provide a that can fetchAuthenticator
s from a backend given the incompleteAuthenticator
argument. The implementation must consider the following fields exclusively, while performing the lookup: It may return more than 1 result, for example when a user can be identified using different modalities. To signal that a user is not allowed/present on the system, a failure should be returned, notnull
. The function signature is as follows:(Authenticator) -> Future
- >>
Authenticator
the incomplete authenticator data to lookup.- async result with a list of authenticators.
- Parameters:
fetcher
- fetcher function.- Returns:
- fluent self.
-
authenticatorFetcher
public WebAuthn authenticatorFetcher(io.reactivex.functions.Function<Authenticator,io.reactivex.Single<List<Authenticator>>> fetcher)
Provide a that can fetchAuthenticator
s from a backend given the incompleteAuthenticator
argument. The implementation must consider the following fields exclusively, while performing the lookup: It may return more than 1 result, for example when a user can be identified using different modalities. To signal that a user is not allowed/present on the system, a failure should be returned, notnull
. The function signature is as follows:(Authenticator) -> Future
- >>
Authenticator
the incomplete authenticator data to lookup.- async result with a list of authenticators.
- Parameters:
fetcher
- fetcher function.- Returns:
- fluent self.
-
authenticatorUpdater
public WebAuthn authenticatorUpdater(Function<Authenticator,Future<Void>> updater)
Provide a that can update or insert aAuthenticator
. The function should store a given authenticator to a persistence storage. When an authenticator is already present, this method must at least updateAuthenticator
, and is not required to perform any other update. For new authenticators, the whole object data must be persisted. The function signature is as follows:(Authenticator) -> Future
Authenticator
the authenticator data to update.- async result of the operation.
- Parameters:
updater
- updater function.- Returns:
- fluent self.
-
authenticatorUpdater
public WebAuthn authenticatorUpdater(io.reactivex.functions.Function<Authenticator,io.reactivex.Completable> updater)
Provide a that can update or insert aAuthenticator
. The function should store a given authenticator to a persistence storage. When an authenticator is already present, this method must at least updateAuthenticator
, and is not required to perform any other update. For new authenticators, the whole object data must be persisted. The function signature is as follows:(Authenticator) -> Future
Authenticator
the authenticator data to update.- async result of the operation.
- Parameters:
updater
- updater function.- Returns:
- fluent self.
-
metaDataService
public MetaDataService metaDataService()
Getter to the instance FIDO2 Meta Data Service.- Returns:
- the MDS instance.
-
-