use of com.okta.authn.sdk.example.views.authn.MfaVerifyView in project okta-auth-java by okta.
the class LoginResource method verifyMfa.
@POST
@Path("/mfa/resend/{type}")
public MfaVerifyView verifyMfa(@PathParam("type") String type) throws AuthenticationException {
AuthenticationResponse previousAuthResult = getPreviousAuthResult();
com.okta.authn.sdk.resource.Factor factor = getFactor(type, previousAuthResult);
authenticationClient.resendVerifyFactor(factor.getId(), previousAuthResult.getStateToken(), new ExampleAuthenticationStateHandler());
return new MfaVerifyView(factor);
}
use of com.okta.authn.sdk.example.views.authn.MfaVerifyView in project okta-auth-java by okta.
the class LoginResource method getResendVerifyMfaView.
@GET
@Path("/mfa/resend/{type}")
public MfaVerifyView getResendVerifyMfaView(@PathParam("type") String type) {
AuthenticationResponse authenticationResponse = getPreviousAuthResult();
com.okta.authn.sdk.resource.Factor factor = getFactor(type, authenticationResponse);
return new MfaVerifyView(factor);
}
use of com.okta.authn.sdk.example.views.authn.MfaVerifyView in project okta-auth-java by okta.
the class LoginResource method getVerifyMfaView.
@GET
@Path("/mfa/verify/{type}")
public MfaVerifyView getVerifyMfaView(@PathParam("type") String type) throws AuthenticationException {
AuthenticationResponse authenticationResponse = getPreviousAuthResult();
com.okta.authn.sdk.resource.Factor factor = getFactor(type, authenticationResponse);
if (factor.getType().equals(FactorType.TOKEN_SOFTWARE_TOTP)) {
return new MfaVerifyView(factor);
} else {
return new MfaVerifyView(challengeFactor(factor, authenticationResponse));
}
}
Aggregations