public interface WebAuthn extends AuthenticationProvider
AuthenticationProvider
instances.Modifier and Type | Method and Description |
---|---|
WebAuthn |
authenticatorFetcher(java.util.function.Function<Authenticator,Future<List<Authenticator>>> fetcher)
Provide a
Function that can fetch Authenticator s from a backend given the incomplete
Authenticator argument. |
WebAuthn |
authenticatorUpdater(java.util.function.Function<Authenticator,Future<Void>> updater)
Provide a
Function that can update or insert a Authenticator . |
static WebAuthn |
create(Vertx vertx)
Create a WebAuthN auth provider
|
static WebAuthn |
create(Vertx vertx,
WebAuthnOptions options)
Create a WebAuthN auth provider
|
Future<JsonObject> |
createCredentialsOptions(JsonObject user)
Same as
createCredentialsOptions(JsonObject, Handler) but returning a Future. |
default WebAuthn |
createCredentialsOptions(JsonObject user,
Handler<AsyncResult<JsonObject>> handler)
Gets a challenge and any other parameters for the
navigator.credentials.create() call. |
Future<JsonObject> |
getCredentialsOptions(String username)
Same as
getCredentialsOptions(String, Handler) but returning a Future. |
default WebAuthn |
getCredentialsOptions(String name,
Handler<AsyncResult<JsonObject>> handler)
Creates an assertion challenge and any other parameters for the
navigator.credentials.get() call. |
MetaDataService |
metaDataService()
Getter to the instance FIDO2 Meta Data Service.
|
authenticate, authenticate, authenticate, authenticate
static WebAuthn create(Vertx vertx)
vertx
- the Vertx instance.static WebAuthn create(Vertx vertx, WebAuthnOptions options)
vertx
- the Vertx instance.options
- the custom options to the provider.default WebAuthn createCredentialsOptions(JsonObject user, Handler<AsyncResult<JsonObject>> handler)
navigator.credentials.create()
call.
The object being returned is described here https://w3c.github.io/webauthn/#dictdef-publickeycredentialcreationoptionsuser
- - the user object with name and optionally displayName and iconhandler
- server encoded make credentials requestFuture<JsonObject> createCredentialsOptions(JsonObject user)
createCredentialsOptions(JsonObject, Handler)
but returning a Future.default WebAuthn getCredentialsOptions(String name, Handler<AsyncResult<JsonObject>> handler)
navigator.credentials.get()
call.
If the auth provider is configured with RequireResidentKey
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-publickeycredentialcreationoptionsname
- the unique user identifiedhandler
- server encoded get assertion requestFuture<JsonObject> getCredentialsOptions(String username)
getCredentialsOptions(String, Handler)
but returning a Future.WebAuthn authenticatorFetcher(java.util.function.Function<Authenticator,Future<List<Authenticator>>> fetcher)
Function
that can fetch Authenticator
s from a backend given the incomplete
Authenticator
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, not null
.
The function signature is as follows:
(Authenticator) -> Future<List<Authenticator>>>
Authenticator
the incomplete authenticator data to lookup.Future
async result with a list of authenticators.fetcher
- fetcher function.WebAuthn authenticatorUpdater(java.util.function.Function<Authenticator,Future<Void>> updater)
Function
that can update or insert a Authenticator
.
The function should store a given authenticator to a persistence storage.
When an authenticator is already present, this method must at least update
Authenticator.getCounter()
, 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<Void>
Authenticator
the authenticator data to update.Future
async result of the operation.updater
- updater function.MetaDataService metaDataService()
Copyright © 2024 Eclipse. All rights reserved.