Registration class abstract

The object that can be used to trigger a registration operation.

Usage example:

  class AuthenticatorSelectorImpl implements AuthenticatorSelector {
    @override
    void selectAuthenticator(
      AuthenticatorSelectionContext context,
      AuthenticatorSelectionHandler handler,
    ) {
      handler.aaid(aaid);
    }
  }

  class BiometricUserVerifierImpl implements BiometricUserVerifier {
    @override
    void verifyBiometric(
      BiometricUserVerificationContext context,
      BiometricUserVerificationHandler handler,
    ) {
      handler.verifyBiometric();
    }
  }

  [...]
  Future<void> register({
    required MobileAuthenticationClient client,
    required String username,
    required DeviceInformation deviceInformation,
  }) async {
    await client.operations.registration
      .username(username)
      .deviceInformation(deviceInformation)
      .authenticatorSelector(AuthenticatorSelectorImpl(...))
      .biometricUserVerifier(BiometricUserVerifierImpl(...))
      .onSuccess(() {
        // handle success
      })
      .onError((error) {
        // handle error
      })
      .execute();
  }
  [...]

The biometric, device passcode and fingerprint authenticators are enrolled at the OS level. That is why, if one of them must be registered, the user must authenticate through BiometricUserVerifier, DevicePasscodeUserVerifier or FingerprintUserVerifier. In the case of the PIN and password, the credentials are enrolled during registration, so no authentication is needed.

Inheritance

Constructors

Registration()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

allowClass2AndroidSensors(bool allowClass2AndroidSensors) Registration
Specifies whether Class 2 (formerly weak) biometric sensors are allowed if the biometric authenticator is selected.
allowDevicePasscodeAsFallback(bool allowDevicePasscodeAsFallback) Registration
Specifies whether the OS device passcode can be used as fallback during biometric authentication.
authenticatorSelector(AuthenticatorSelector authenticatorSelector) Registration
Specifies the object that will take care of the selection of the authenticator to be used.
authorizationProvider(AuthorizationProvider authorizationProvider) Registration
Specifies the authorization provider that must be used to register the authenticator.
biometricUserVerifier(BiometricUserVerifier biometricUserVerifier) Registration
Specifies the object that will take care of the biometric user verification. It must be provided only if a biometric authenticator must be registered.
deviceInformation(DeviceInformation deviceInformation) Registration
Specifies the device information to be used.
devicePasscodeUserVerifier(DevicePasscodeUserVerifier devicePasscodeUserVerifier) Registration
Specifies the object that will take care of the device passcode user verification. It must be provided only if a device passcode authenticator must be registered.
execute() Future<void>
Executes the operation asynchronously.
inherited
fingerprintUserVerifier(FingerprintUserVerifier fingerprintUserVerifier) Registration
Specifies the object that will take care of the fingerprint user verification. It must be provided only if a fingerprint authenticator must be registered.
invalidateOnNewOsBiometrics(bool invalidateOnNewOsBiometrics) Registration
Specifies whether the authenticator must be invalidated if the user adds new biometric credentials in the OS settings. If the authenticator has been invalidated, and you try to authenticate with it, an error with code FidoErrorCodeType.keyDisappearedPermanently will be returned by the authentication operation.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onError(dynamic onError(OperationError)) Registration
Specifies the object that will be invoked if the registration failed.
onSuccess(Function onSuccess) Registration
Specifies the object that will be invoked if the registration completed successfully.
passwordEnroller(PasswordEnroller passwordEnroller) Registration
Specifies the object that will take care of enrolling the password of the authenticator. It must be provided only if a password authenticator must be registered.
pinEnroller(PinEnroller pinEnroller) Registration
Specifies the object that will take care of enrolling the PIN of the authenticator. It must be provided only if a PIN authenticator must be registered.
requestHeaders(RequestHeaders requestHeaders) Registration
Specifies the additional request headers that must be included in the HTTP requests sent by the operation.
inherited
serverUrl(String serverUrl) Registration
Specifies the base URL of the server where the registration should be made. If no server base URL is provided, then the base URL defined in Configuration.baseUrl will be used.
toString() String
A string representation of this object.
inherited
username(String username) Registration
Specifies the username that must be used to register.

Operators

operator ==(Object other) bool
The equality operator.
inherited