Skip to content

OAuth Validation Step

The OTPAuthValidation step validates the succeeded OTP registration. It should be used after an OTPConfigurationStep and an authenticationtstep(SAML, OAuth2, and Basic).

If the validation fails, the steps clear the registration from the cookie store.

Input Parameters

Mandatory input parameters:

  • onboardingParameters – This setting is provided on the flowContext typically configured by the OTPConfigurationStep.

Using OTPAuthenticationStep

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

      try {
          OnboardingParameters onboardingParameters = new OnboardingParameters();
      } catch (MalformedURLException e) {
        //error handling
  2. Initiate the step.

      OTPAuthenticationStep otpAuthenticationStep = new OTPAuthenticationStep();
  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

Last update: April 14, 2021