Package com.okta.authn.sdk
Interface AuthenticationStateHandler
- All Known Implementing Classes:
AuthenticationStateHandlerAdapter,ExampleAuthenticationStateHandler
public interface AuthenticationStateHandler
Each method of
AuthenticationStateHandler corresponds to a state of Okta's Authentication state machine. Each
method in @AuthenticationClient may return a different result
depending on the current state of the user (password locked, etc) and the current configuration of your Okta
organization.
Implementation Notes:
Your Okta organization MAY not be configured to enter all of these states. At minimum you should implement:handleUnknownhandleSuccesshandlePasswordExpiredhandlePasswordWarning(unless thewarnBeforePasswordExpiredflag was set when callingAuthenticationClient.authenticate(com.okta.authn.sdk.resource.AuthenticationRequest, AuthenticationStateHandler)
handleLockedOut, if self-service unlock is enabled for your Okta organization.
If you want to support password recovery flows you must implement:
handleRecoveryhandleRecoveryChallengehandlePasswordReset
handleMfaRequiredhandleMfaEnrollhandleMfaEnrollActivatehandleMfaChallenge
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidhandleLockedOut(@NotNull AuthenticationResponse lockedOut) voidhandleMfaChallenge(@NotNull AuthenticationResponse mfaChallengeResponse) voidhandleMfaEnroll(@NotNull AuthenticationResponse mfaEnroll) voidhandleMfaEnrollActivate(@NotNull AuthenticationResponse mfaEnrollActivate) voidhandleMfaRequired(@NotNull AuthenticationResponse mfaRequiredResponse) voidhandlePasswordExpired(@NotNull AuthenticationResponse passwordExpired) voidhandlePasswordReset(@NotNull AuthenticationResponse passwordReset) voidhandlePasswordWarning(@NotNull AuthenticationResponse passwordWarning) voidhandleRecovery(@NotNull AuthenticationResponse recovery) voidhandleRecoveryChallenge(@NotNull AuthenticationResponse recoveryChallenge) voidhandleSuccess(@NotNull AuthenticationResponse successResponse) voidhandleUnauthenticated(@NotNull AuthenticationResponse unauthenticatedResponse) voidhandleUnknown(@NotNull AuthenticationResponse unknownResponse)
-
Method Details
-
handleUnauthenticated
-
handlePasswordWarning
-
handlePasswordExpired
-
handleRecovery
-
handleRecoveryChallenge
-
handlePasswordReset
-
handleLockedOut
-
handleMfaRequired
-
handleMfaEnroll
-
handleMfaEnrollActivate
-
handleMfaChallenge
-
handleSuccess
-
handleUnknown
-