Interface MobileAuthenticationClientInitializer


public interface MobileAuthenticationClientInitializer
The class that creates and initializes asynchronously an instance of MobileAuthenticationClient.
  • Method Details

    • application

      @Deprecated(since="3.7.0") @NonNull MobileAuthenticationClientInitializer application(@NonNull android.app.Application application)
      Deprecated.
      use context(Context) instead.
      Sets the Android application.
      Parameters:
      application - the Android application.
      Returns:
      an initializer
    • context

      @NonNull MobileAuthenticationClientInitializer context(@NonNull android.content.Context context)
      Sets the Android context. If you plan to use the same instance of the MobileAuthenticationClient across different activities, this must be the application context.

      Providing the context is required.

      Parameters:
      context - the Android context.
      Returns:
      an initializer
    • configuration

      @NonNull MobileAuthenticationClientInitializer configuration(@NonNull Configuration configuration)
      Sets the configuration of the MobileAuthenticationClient.

      Providing the configuration is required.

      Parameters:
      configuration - the MobileAuthenticationClient configuration.
      Returns:
      an initializer
    • onError

      @NonNull MobileAuthenticationClientInitializer onError(@NonNull Consumer<InitializationError> errorConsumer)
      The object invoked when an error occurs after invoking execute(). This object will be invoked in the main/UI thread.

      Providing the object handling the error is required.

      Parameters:
      errorConsumer - the object handling the error
      Returns:
      an initializer
    • onSuccess

      @NonNull MobileAuthenticationClientInitializer onSuccess(@NonNull Consumer<MobileAuthenticationClient> mobileAuthenticationClientConsumer)
      The method invoked when the MobileAuthenticationClient could be successfully built after invoking execute(). This object will be invoked in the main/UI thread.

      Providing the object handling the MobileAuthenticationClient is required.

      Parameters:
      mobileAuthenticationClientConsumer - the object handling the MobileAuthenticationClient
      Returns:
      an initializer
    • execute

      void execute()
      Starts the creation of an instance of the MobileAuthenticationClient. If an error occurs, it is provided through onError(Consumer), if the MobileAuthenticationClient can be successfully built and initialized, it is provided through onSuccess(Consumer).
    • initializer

      @NonNull static MobileAuthenticationClientInitializer initializer()
      Returns a new MobileAuthenticationClientInitializer.
      Returns:
      a new MobileAuthenticationClientInitializer