Search in sources :

Example 1 with RecoveryView

use of com.okta.authn.sdk.example.views.authn.RecoveryView in project okta-auth-java by okta.

the class LoginResource method getRecoveryView.

@GET
@Path("/recovery")
public RecoveryView getRecoveryView() {
    AuthenticationResponse previousAuthResult = getPreviousAuthResult();
    String question = previousAuthResult.getUser().getRecoveryQuestion().get("question");
    return new RecoveryView(question);
}
Also used : RecoveryView(com.okta.authn.sdk.example.views.authn.RecoveryView) PasswordRecoveryView(com.okta.authn.sdk.example.views.authn.PasswordRecoveryView) UnlockAccountRecoveryView(com.okta.authn.sdk.example.views.authn.UnlockAccountRecoveryView) AuthenticationResponse(com.okta.authn.sdk.resource.AuthenticationResponse) Path(javax.ws.rs.Path) GET(javax.ws.rs.GET)

Aggregations

PasswordRecoveryView (com.okta.authn.sdk.example.views.authn.PasswordRecoveryView)1 RecoveryView (com.okta.authn.sdk.example.views.authn.RecoveryView)1 UnlockAccountRecoveryView (com.okta.authn.sdk.example.views.authn.UnlockAccountRecoveryView)1 AuthenticationResponse (com.okta.authn.sdk.resource.AuthenticationResponse)1 GET (javax.ws.rs.GET)1 Path (javax.ws.rs.Path)1