use of com.okta.authn.sdk.resource.VerifyFactorRequest in project okta-auth-java by okta.
the class LoginResource method recoverChallenge.
@POST
@Path("/recover/verify")
public void recoverChallenge(@FormParam("passCode") String passCode) throws AuthenticationException {
AuthenticationResponse previousAuthResult = getPreviousAuthResult();
VerifyFactorRequest request = authenticationClient.instantiate(VerifyPassCodeFactorRequest.class).setPassCode(passCode).setStateToken(previousAuthResult.getStateToken());
authenticationClient.verifyFactor(previousAuthResult.getFactors().get(0).getId(), request, new ExampleAuthenticationStateHandler());
}
Aggregations