OutOfBandAuthentication class abstract

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 PinUserVerifierImpl implements PinUserVerifier {
    @override
    void verifyPin(
      PinUserVerificationContext context,
      PinUserVerificationHandler handler,
    ) {
      handler.verifyPin(pin);
    }
  }

  class PasswordUserVerifierImpl implements PasswordUserVerifier {
    @override
    void verifyPassword(
      PasswordUserVerificationContext context,
      PasswordUserVerificationHandler handler,
    ) {
      handler.verifyPassword(password);
    }
  }

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

  [...]
  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(...))
          .pinUserVerifier(PinUserVerifierImpl(...))
          .passwordUserVerifier(PasswordUserVerifierImpl(...))
          .biometricUserVerifier(BiometricUserVerifierImpl(...))
          .onSuccess((authorizationProvider) {
            // handle success
          })
          .onError((error) {
            // handle error
          })
      })
      .onError((error) {
        // handle out-of-band error
      })
      .execute();
  }
  [...]

See OutOfBandOperation.onAuthentication

Inheritance

Constructors

OutOfBandAuthentication()

Properties

hashCode int
The hash code for this object.
no setterinherited
operationId String
The identifier of the encapsulating operation.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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 nonexistent 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.
passwordUserVerifier(PasswordUserVerifier passwordUserVerifier) OutOfBandAuthentication
Specifies the object that will take care of the password user verification.
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