Skip to content

Basic Authentication Store Step

BasicAuthStoreStep persists/rereads/erases the user credential data provided by BasicAuthStep. This step has to be executed after the successful initialization of the application store. This means that there is no secure store (except the passcodePolicyStore) in the onboarding flow before the execution of the SecureStoreStep.

Input Parameters

Mandatory input parameters:

  • Application store – Properly initialized and opened application store implementation typically provided by the StoreManagerStep and can be accessed using the getApplicationStore method of the OnboardingContext .

  • Context – Specifies the Android context initiating the flow, such as the caller Activity. This setting has to be provided on the initial FlowContext.

Output Parameters

The output of the step is always in the application store.

Using BasicAuthStoreStep

  1. Set the application store in the flowContext.

  2. Initiate the step:

      BasicAuthStoreStep basicAuthStoreStep = new BasicAuthStoreStep();
  3. Specify the execute method's FlowActionHandler parameter's "onFailure" and "onSuccess" behavior:

     flowManagerService.execute(flow, flowContext, new FlowActionHandler() {
                public void onFailure(Throwable t) {
                    //set the status, update the caller activity
                public void onSuccess(FlowContext result) {
                    //set the status, update the caller activity
                    //read the result

Behavior of BasicAuthStoreStep

In case of the onboard scenario, this step persists the user credential (username, password) data in the application store.

In case of the restore scenario, this step makes available the persisted user credential data for the basic authorization requests. During the execution of the step, no data is read from the application store. Only a reference to the store is set and, during network communication, this reference is used by the foundation layer to restore the user credential.

In case of the reset scenario, the persisted user credential is deleted from the application store.

Last update: April 14, 2021