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