OutOfBandAuthentication class Null safety

The operation handling an out-of-band authentication.

This is the object returned by the SDK, when an OutOfBandPayload was processed and the OutOfBandPayload corresponds to an authentication operation.

Usage example:

  class AccountSelectorImpl implements AccountSelector {
    @override
    void selectAccount(
      AccountSelectionContext context,
      AccountSelectionHandler handler,
    ) {
      handler.username(username);
    }
  }

  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();
    }
  }

  class PinEnrollerImpl implements PinEnroller {
    @override
    void enrollPin(
      PinEnrollmentContext context,
      PinEnrollmentHandler handler,
    ) {
      handler.pin(pin);
    }
  }

  [...]
  Future<void> authenticateWithOutOfBand({
    required MobileAuthenticationClient client,
    required OutOfBandPayload payload,
  }) async {
    await client.operations.outOfBandOperation.
      .payload(payload)
      .onRegistration((registration) {
        // handle registration
      })
      .onAuthentication((authentication) {
        authentication
          .accountSelector(AccountSelectorImpl(...))
          .authenticatorSelector(AuthenticatorSelectorImpl(...))
          .biometricUserVerifier(BiometricUserVerifierImpl(...))
          .onSuccess((authorizationProvider) {
            // handle success
          })
          .onError((error) {
            // handle error
          })
      })
      .onError((error) {
        // handle out-of-band error
      })
      .execute();
  }
  [...]
Inheritance

Constructors

OutOfBandAuthentication()

Properties

hashCode → int
The hash code for this object.
read-onlyinherited
operationId ↔ String
The identifier of the encapsulating operation.
read / writeinherited
runtimeType → Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

accountSelector(AccountSelector accountSelector) OutOfBandAuthentication
Specifies the object that will take care of the account selection.
authenticatorSelector(AuthenticatorSelector authenticatorSelector) OutOfBandAuthentication
Specifies the object that will take care of the selection of the authenticator to be used.
biometricUserVerifier(BiometricUserVerifier biometricUserVerifier) OutOfBandAuthentication
Specifies the object that will take care of the biometric user verification.
devicePasscodeUserVerifier(DevicePasscodeUserVerifier devicePasscodeUserVerifier) OutOfBandAuthentication
Specifies the object that will take care of the device passcode user verification.
execute() → Future<void>
Executes the operation asynchronously.
inherited
fingerprintUserVerifier(FingerprintUserVerifier fingerprintUserVerifier) OutOfBandAuthentication
Specifies the object that will take care of the fingerprint user verification.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
onError(dynamic onError(OperationError)) OutOfBandAuthentication
Specifies the object that will be invoked if the authentication failed.
onSuccess(dynamic onSuccess(AuthorizationProvider?)) OutOfBandAuthentication
Specifies the object that will be invoked if the authentication was successful.
pinUserVerifier(PinUserVerifier pinUserVerifier) OutOfBandAuthentication
Specifies the object that will take care of the PIN user verification.
requestHeaders(RequestHeaders requestHeaders) OutOfBandAuthentication
Specifies the additional request headers that must be included in the HTTP requests sent by the operation.
inherited
setOperationId(String operationId) → void
Sets the identifier of the encapsulating operation.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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