Interface WebAuthn4J
- All Superinterfaces:
AuthenticationProvider
Factory interface for creating WebAuthN based
AuthenticationProvider instances.- Author:
- Paulo Lopes
-
Method Summary
Modifier and TypeMethodDescriptionstatic WebAuthn4JCreate a WebAuthN auth providerstatic WebAuthn4Jcreate(Vertx vertx, WebAuthn4JOptions options) Create a WebAuthN auth providerdefault Future<JsonObject> Deprecated.Gets a challenge and any other parameters for thenavigator.credentials.create()call.Creates an assertion challenge and any other parameters for thenavigator.credentials.get()call.credentialStorage(CredentialStorage credentialStorage) Provide aCredentialStoragethat can fetchAuthenticators from storage and update them.default Future<JsonObject> getCredentialsOptions(String username) Deprecated.the name of this method is misleading, as it creates aPublicKeyCredentialRequestOptionsobject, usecreatePublicKeyCredentialRequestOptions(String)insteadMethods inherited from interface AuthenticationProvider
authenticate
-
Method Details
-
create
Create a WebAuthN auth provider- Parameters:
vertx- the Vertx instance.- Returns:
- the auth provider.
-
create
Create a WebAuthN auth provider- Parameters:
vertx- the Vertx instance.options- the custom options to the provider.- Returns:
- the auth provider.
-
createPublicKeyCredentialCreationOptions
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
-
createCredentialsOptions
Deprecated.the name of this method is misleading, as it creates aPublicKeyCredentialCreationOptionsobject, usecreatePublicKeyCredentialCreationOptions(JsonObject)insteadGets 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
-
createPublicKeyCredentialRequestOptions
Creates an assertion challenge and any other parameters for thenavigator.credentials.get()call. If the auth provider is configured withRequireResidentKeyand 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-publickeycredentialrequestoptions
- Parameters:
username- the unique user identified- Returns:
- a future notified with the server encoded get assertion request
-
getCredentialsOptions
Deprecated.the name of this method is misleading, as it creates aPublicKeyCredentialRequestOptionsobject, usecreatePublicKeyCredentialRequestOptions(String)insteadCreates an assertion challenge and any other parameters for thenavigator.credentials.get()call. If the auth provider is configured withRequireResidentKeyand 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-publickeycredentialrequestoptions
- Parameters:
username- the unique user identified- Returns:
- a future notified with the server encoded get assertion request
-
credentialStorage
Provide aCredentialStoragethat can fetchAuthenticators from storage and update them.- Parameters:
credentialStorage- the storage abstraction for credentials.- Returns:
- fluent self.
-
PublicKeyCredentialCreationOptionsobject, usecreatePublicKeyCredentialCreationOptions(JsonObject)instead