Skip to content

OTP Configuration Step

OTPConfigurationStep configures the HTTP client. This step should be used with an authentication step (SAML, Basic, or OAuth2) and with the OTPAuthValidation.

Input Parameters

Mandatory input parameters:

  • authType – Specifies the authorization type. This parameter is important and should match the next step. If the authentication type is Basic, the next should be BasicAuthStep and so on.

  • settingsParameters – This setting is provided on the flowContext.

Optional input parameter:

  • OAuth2Processor – Specifies the OAuth2 processor. If the user define their own processor, the OAuth2 step uses that.

Using OTPConfigurationStep

  1. Set the Context and the onboarding settings in the flowContext.

      try {
            OnboardingParameters onboardingParameters = new OnboardingParameters();
      } catch (MalformedURLException e) {
        //error handling
  2. In the case of OAuth authentication, set the OAuth2 configuration:

                OAuth2Configuration.Builder builer = new OAuth2Configuration.Builder();
                config = builer.clientId("3860f7b5-2dc2-4842-8d31-7f7d8c52e9fc")
  3. Initiate the step and set the authorization type:

      OTPConfigurationStep otpConfigurationStep = new OTPConfigurationStep();
  4. Specify the flow and the execute method's FlowActionHandler parameter's "onFailure" and "onSuccess" behavior:

     OTPAuthValidationStep otpAuthValidationStep = new OTPAuthValidationStep();
        flowSteps = new Step[] {
               otpConfigurationStep, authStep, otpAuthValidationStep
     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

Last update: April 14, 2021