Package io.vertx.ext.auth.webauthn4j
Interface WebAuthn4J
-
- All Superinterfaces:
AuthenticationProvider
public interface WebAuthn4J extends AuthenticationProvider
Factory interface for creating WebAuthN basedAuthenticationProvider
instances.- Author:
- Paulo Lopes
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static WebAuthn4J
create(Vertx vertx)
Create a WebAuthN auth providerstatic WebAuthn4J
create(Vertx vertx, WebAuthn4JOptions options)
Create a WebAuthN auth providerFuture<JsonObject>
createCredentialsOptions(JsonObject user)
Gets a challenge and any other parameters for thenavigator.credentials.create()
call.WebAuthn4J
credentialStorage(CredentialStorage credentialStorage)
Provide aCredentialStorage
that can fetchAuthenticator
s from storage and update them.Future<JsonObject>
getCredentialsOptions(String username)
Creates an assertion challenge and any other parameters for thenavigator.credentials.get()
call.-
Methods inherited from interface io.vertx.ext.auth.authentication.AuthenticationProvider
authenticate
-
-
-
-
Method Detail
-
create
static WebAuthn4J create(Vertx vertx)
Create a WebAuthN auth provider- Parameters:
vertx
- the Vertx instance.- Returns:
- the auth provider.
-
create
static WebAuthn4J create(Vertx vertx, WebAuthn4JOptions options)
Create a WebAuthN auth provider- Parameters:
vertx
- the Vertx instance.options
- the custom options to the provider.- Returns:
- the auth provider.
-
createCredentialsOptions
Future<JsonObject> 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:
- a future notified with the encoded make credentials request
-
getCredentialsOptions
Future<JsonObject> getCredentialsOptions(String username)
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:
username
- the unique user identified- Returns:
- a future notified with the server encoded get assertion request
-
credentialStorage
WebAuthn4J credentialStorage(CredentialStorage credentialStorage)
Provide aCredentialStorage
that can fetchAuthenticator
s from storage and update them.- Parameters:
credentialStorage
- the storage abstraction for credentials.- Returns:
- fluent self.
-
-