Package com.okta.authn.sdk.impl.client
Class DefaultAuthenticationClient
java.lang.Object
com.okta.sdk.impl.client.BaseClient
com.okta.authn.sdk.impl.client.DefaultAuthenticationClient
- All Implemented Interfaces:
AuthenticationClient
,com.okta.sdk.ds.DataStore
public class DefaultAuthenticationClient
extends com.okta.sdk.impl.client.BaseClient
implements AuthenticationClient
-
Constructor Summary
ConstructorDescriptionDefaultAuthenticationClient
(com.okta.sdk.impl.config.ClientConfiguration clientConfiguration) Instantiates a new AuthenticationClient instance that will communicate with the Okta REST API. -
Method Summary
Modifier and TypeMethodDescriptionactivateFactor
(String factorId, ActivateFactorRequest request, RequestContext requestContext, AuthenticationStateHandler stateHandler) The sms, call and token:software:totp factor types require activation to complete the enrollment process.answerRecoveryQuestion
(RecoveryQuestionAnswerRequest request, RequestContext requestContext, AuthenticationStateHandler stateHandler) Answers the user’s recovery question to ensure only the end user redeemed the recovery token for recovery transaction with a RECOVERY status.answerRecoveryQuestion
(String answer, String stateToken, AuthenticationStateHandler stateHandler) Answers the user’s recovery question to ensure only the end user redeemed the recovery token for recovery transaction with a RECOVERY status.authenticate
(AuthenticationRequest request, RequestContext requestContext, AuthenticationStateHandler stateHandler) Initiates a username and password login against Okta's Authentication API.authenticate
(String username, char[] password, String relayState, AuthenticationStateHandler stateHandler) Initiates a username and password login against Okta's Authentication API.cancel
(String stateToken, RequestContext requestContext) Cancels the current transaction and revokes the state token.challengeFactor
(String factorId, String stateToken, RequestContext requestContext, AuthenticationStateHandler stateHandler) Requests a challenge factor be sent to the user via the corresponding {code}factorId{code}.changePassword
(char[] oldPassword, char[] newPassword, String stateToken, AuthenticationStateHandler stateHandler) This operation changes a user’s password by providing the existing password and the new password password for authentication transactions with either the PASSWORD_EXPIRED or PASSWORD_WARN state.changePassword
(ChangePasswordRequest changePasswordRequest, RequestContext requestContext, AuthenticationStateHandler stateHandler) This operation changes a user’s password by providing the existing password and the new password password for authentication transactions with either the PASSWORD_EXPIRED or PASSWORD_WARN state.enrollFactor
(FactorEnrollRequest request, RequestContext requestContext, AuthenticationStateHandler stateHandler) Enrolls a user with a factor assigned by their MFA Policy.enrollFactor
(FactorType type, FactorProvider provider, FactorProfile factorProfile, String stateToken, AuthenticationStateHandler stateHandler) Enrolls a user with a factor assigned by their MFA Policy.previous
(String stateToken, RequestContext requestContext, AuthenticationStateHandler stateHandler) Moves the current transaction state back to the previous state.recoverPassword
(RecoverPasswordRequest request, RequestContext requestContext, AuthenticationStateHandler stateHandler) Starts a new password recovery transaction for a given user and issues a recovery token that can be used to reset a user’s password.recoverPassword
(String username, FactorType factorType, String relayState, AuthenticationStateHandler stateHandler) Starts a new password recovery transaction for a given user and issues a recovery token that can be used to reset a user’s password.resendActivateFactor
(String factorId, String stateToken, RequestContext requestContext, AuthenticationStateHandler stateHandler) Resend an activation factor challenge to a user.resendVerifyFactor
(String factorId, String stateToken, RequestContext requestContext, AuthenticationStateHandler stateHandler) Resend a factor verification challenge to a user.resetPassword
(char[] newPassword, String stateToken, AuthenticationStateHandler stateHandler) Resets a user’s password to complete a recovery transaction with a PASSWORD_RESET state.resetPassword
(ChangePasswordRequest request, RequestContext requestContext, AuthenticationStateHandler stateHandler) Resets a user’s password to complete a recovery transaction with a PASSWORD_RESET state.sendActivationEmail
(String factorId, String stateToken, RequestContext requestContext, AuthenticationStateHandler stateHandler) Sends an activation email when the user is unable to scan the QR code provided as part of an Okta Verify transaction.skip
(String stateToken, RequestContext requestContext, AuthenticationStateHandler stateHandler) Skip the current transaction state and advance to the next state.unlockAccount
(UnlockAccountRequest request, RequestContext requestContext, AuthenticationStateHandler stateHandler) Starts a new unlock recovery transaction for a given user and issues a recovery token that can be used to unlock a user’s account.unlockAccount
(String username, FactorType factorType, String relayState, AuthenticationStateHandler stateHandler) Starts a new unlock recovery transaction for a given user and issues a recovery token that can be used to unlock a user’s account.verifyActivation
(String factorId, String stateToken, RequestContext requestContext, AuthenticationStateHandler stateHandler) Returns the state of factor's activation.verifyFactor
(String factorId, VerifyFactorRequest request, RequestContext requestContext, AuthenticationStateHandler stateHandler) Verifies an enrolled factor for an authentication transaction with the MFA_REQUIRED or MFA_CHALLENGE stateverifyFactor
(String factorId, String stateToken, RequestContext requestContext, AuthenticationStateHandler stateHandler) Verifies the state of a factor.verifyRecoveryToken
(String recoveryToken, RequestContext requestContext, AuthenticationStateHandler stateHandler) Validates a recovery token that was distributed to the end user to continue the recovery transaction.verifyUnlockAccount
(FactorType factorType, VerifyRecoveryRequest request, RequestContext requestContext, AuthenticationStateHandler stateHandler) Verifies a recovery challenge sent to the user for primary authentication for a recovery transaction with RECOVERY_CHALLENGE status.Methods inherited from class com.okta.sdk.impl.client.BaseClient
create, createDataStore, createRequestExecutor, delete, getCacheManager, getClientCredentials, getDataStore, getResource, http, instantiate, isReady, save
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.okta.authn.sdk.client.AuthenticationClient
activateFactor, answerRecoveryQuestion, authenticate, cancel, challengeFactor, changePassword, enrollFactor, getDataStore, instantiate, previous, recoverPassword, resendActivateFactor, resendVerifyFactor, resetPassword, sendActivationEmail, skip, unlockAccount, verifyActivation, verifyFactor, verifyFactor, verifyRecoveryToken, verifyUnlockAccount
-
Constructor Details
-
DefaultAuthenticationClient
public DefaultAuthenticationClient(com.okta.sdk.impl.config.ClientConfiguration clientConfiguration) Instantiates a new AuthenticationClient instance that will communicate with the Okta REST API. See the class-level JavaDoc for a usage example.- Parameters:
clientConfiguration
- theClientConfiguration
containing the connection information
-
-
Method Details
-
authenticate
public AuthenticationResponse authenticate(String username, char[] password, String relayState, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
Initiates a username and password login against Okta's Authentication API. A user should not be considered logged in until both the response status is {code SUCCESS} and the sessionToken is non null.- Specified by:
authenticate
in interfaceAuthenticationClient
- Parameters:
username
- User’s non-qualified short-name (e.g. dade.murphy) or unique fully-qualified login (e.g dade.murphy@example.com)password
- User’s password credentialrelayState
- Optional state value that is persisted for the lifetime of the authentication transactionstateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
authenticate
public AuthenticationResponse authenticate(AuthenticationRequest request, RequestContext requestContext, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
Initiates a username and password login against Okta's Authentication API. A user should not be considered logged in until both the response status is {code SUCCESS} and the sessionToken is non null.- Specified by:
authenticate
in interfaceAuthenticationClient
- Parameters:
request
- a request object holds all attributes sent to the remote API.requestContext
- additional request headers and query parameters used for this requeststateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
changePassword
public AuthenticationResponse changePassword(char[] oldPassword, char[] newPassword, String stateToken, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
This operation changes a user’s password by providing the existing password and the new password password for authentication transactions with either the PASSWORD_EXPIRED or PASSWORD_WARN state.- Specified by:
changePassword
in interfaceAuthenticationClient
- Parameters:
oldPassword
- User’s current password that is expired or about to expirenewPassword
- New password for userstateToken
- state token for current transactionstateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
changePassword
public AuthenticationResponse changePassword(ChangePasswordRequest changePasswordRequest, RequestContext requestContext, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
This operation changes a user’s password by providing the existing password and the new password password for authentication transactions with either the PASSWORD_EXPIRED or PASSWORD_WARN state.- Specified by:
changePassword
in interfaceAuthenticationClient
- Parameters:
changePasswordRequest
- a request object holds all attributes sent to the remote API.requestContext
- additional request headers and query parameters used for this requeststateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
resetPassword
public AuthenticationResponse resetPassword(char[] newPassword, String stateToken, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
Resets a user’s password to complete a recovery transaction with a PASSWORD_RESET state.- Specified by:
resetPassword
in interfaceAuthenticationClient
- Parameters:
newPassword
- User’s new passwordstateToken
- state token for current transactionstateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
resetPassword
public AuthenticationResponse resetPassword(ChangePasswordRequest request, RequestContext requestContext, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
Resets a user’s password to complete a recovery transaction with a PASSWORD_RESET state.- Specified by:
resetPassword
in interfaceAuthenticationClient
- Parameters:
request
- a request object holds all attributes sent to the remote APIrequestContext
- additional request headers and query parameters used for this requeststateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
recoverPassword
public AuthenticationResponse recoverPassword(String username, FactorType factorType, String relayState, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
Starts a new password recovery transaction for a given user and issues a recovery token that can be used to reset a user’s password.- Specified by:
recoverPassword
in interfaceAuthenticationClient
- Parameters:
username
- User’s non-qualified short-name (e.g. dade.murphy) or unique fully-qualified login (dade.murphy@example.com)factorType
- Recovery factor to use for primary authenticationrelayState
- Optional state value that is persisted for the lifetime of the recovery transactionstateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
recoverPassword
public AuthenticationResponse recoverPassword(RecoverPasswordRequest request, RequestContext requestContext, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
Starts a new password recovery transaction for a given user and issues a recovery token that can be used to reset a user’s password.- Specified by:
recoverPassword
in interfaceAuthenticationClient
- Parameters:
request
- a request object holds all attributes sent to the remote API.requestContext
- additional request headers and query parameters used for this requeststateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
challengeFactor
public AuthenticationResponse challengeFactor(String factorId, String stateToken, RequestContext requestContext, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
Requests a challenge factor be sent to the user via the corresponding {code}factorId{code}.- Specified by:
challengeFactor
in interfaceAuthenticationClient
- Parameters:
factorId
- id of factor returned from enrollmentstateToken
- state token for current transactionrequestContext
- additional request headers and query parameters used for this requeststateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
verifyFactor
public AuthenticationResponse verifyFactor(String factorId, String stateToken, RequestContext requestContext, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
Verifies the state of a factor. Some factors (Push, Duo, etc) depend on a user action, this method can be used to poll the state of the a factor and transition to the next state when completed.- Specified by:
verifyFactor
in interfaceAuthenticationClient
- Parameters:
factorId
- id of factor returned from enrollmentstateToken
- state token for current transactionrequestContext
- additional request headers and query parameters used for this requeststateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
verifyFactor
public AuthenticationResponse verifyFactor(String factorId, VerifyFactorRequest request, RequestContext requestContext, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
Verifies an enrolled factor for an authentication transaction with the MFA_REQUIRED or MFA_CHALLENGE state- Specified by:
verifyFactor
in interfaceAuthenticationClient
- Parameters:
factorId
- id of factor returned from enrollmentrequest
- the request object containing the required attributes to fulfill the verificationrequestContext
- additional request headers and query parameters used for this requeststateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
activateFactor
public AuthenticationResponse activateFactor(String factorId, ActivateFactorRequest request, RequestContext requestContext, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
The sms, call and token:software:totp factor types require activation to complete the enrollment process.- Specified by:
activateFactor
in interfaceAuthenticationClient
- Parameters:
factorId
- id of factor returned from enrollmentrequest
- the request object containing the required attributes to fulfill the activationrequestContext
- additional request headers and query parameters used for this requeststateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
verifyUnlockAccount
public AuthenticationResponse verifyUnlockAccount(FactorType factorType, VerifyRecoveryRequest request, RequestContext requestContext, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
Verifies a recovery challenge sent to the user for primary authentication for a recovery transaction with RECOVERY_CHALLENGE status.- Specified by:
verifyUnlockAccount
in interfaceAuthenticationClient
- Parameters:
factorType
- type of factorrequest
- the request object containing the required attributes to fulfill this challengerequestContext
- additional request headers and query parameters used for this requeststateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
unlockAccount
public AuthenticationResponse unlockAccount(String username, FactorType factorType, String relayState, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
Starts a new unlock recovery transaction for a given user and issues a recovery token that can be used to unlock a user’s account.- Specified by:
unlockAccount
in interfaceAuthenticationClient
- Parameters:
username
- User’s non-qualified short-name (dade.murphy) or unique fully-qualified login (dade.murphy@example.com)factorType
- Recovery factor to use for primary authenticationrelayState
- Optional state value that is persisted for the lifetime of the recovery transactionstateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
unlockAccount
public AuthenticationResponse unlockAccount(UnlockAccountRequest request, RequestContext requestContext, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
Starts a new unlock recovery transaction for a given user and issues a recovery token that can be used to unlock a user’s account.- Specified by:
unlockAccount
in interfaceAuthenticationClient
- Parameters:
request
- a request object holds all attributes sent to the remote API.requestContext
- additional request headers and query parameters used for this requeststateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
answerRecoveryQuestion
public AuthenticationResponse answerRecoveryQuestion(String answer, String stateToken, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
Answers the user’s recovery question to ensure only the end user redeemed the recovery token for recovery transaction with a RECOVERY status.- Specified by:
answerRecoveryQuestion
in interfaceAuthenticationClient
- Parameters:
answer
- answer to user’s recovery questionstateToken
- state token for current transactionstateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
answerRecoveryQuestion
public AuthenticationResponse answerRecoveryQuestion(RecoveryQuestionAnswerRequest request, RequestContext requestContext, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
Answers the user’s recovery question to ensure only the end user redeemed the recovery token for recovery transaction with a RECOVERY status.- Specified by:
answerRecoveryQuestion
in interfaceAuthenticationClient
- Parameters:
request
- a request object holds all attributes sent to the remote API.requestContext
- additional request headers and query parameters used for this requeststateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
enrollFactor
public AuthenticationResponse enrollFactor(FactorType type, FactorProvider provider, FactorProfile factorProfile, String stateToken, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
Enrolls a user with a factor assigned by their MFA Policy.- Specified by:
enrollFactor
in interfaceAuthenticationClient
- Parameters:
type
- type of factorprovider
- factor providerfactorProfile
- profile of a supported factorstateToken
- state token for current transactionstateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error- See Also:
-
enrollFactor
public AuthenticationResponse enrollFactor(FactorEnrollRequest request, RequestContext requestContext, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
Enrolls a user with a factor assigned by their MFA Policy.- Specified by:
enrollFactor
in interfaceAuthenticationClient
- Parameters:
request
- a request object holds all attributes sent to the remote API.requestContext
- additional request headers and query parameters used for this requeststateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error- See Also:
-
previous
public AuthenticationResponse previous(String stateToken, RequestContext requestContext, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
Moves the current transaction state back to the previous state.- Specified by:
previous
in interfaceAuthenticationClient
- Parameters:
stateToken
- state token for current transactionrequestContext
- additional request headers and query parameters used for this requeststateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
skip
public AuthenticationResponse skip(String stateToken, RequestContext requestContext, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
Skip the current transaction state and advance to the next state.- Specified by:
skip
in interfaceAuthenticationClient
- Parameters:
stateToken
- state token for current transactionrequestContext
- additional request headers and query parameters used for this requeststateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
cancel
public AuthenticationResponse cancel(String stateToken, RequestContext requestContext) throws AuthenticationException Description copied from interface:AuthenticationClient
Cancels the current transaction and revokes the state token.- Specified by:
cancel
in interfaceAuthenticationClient
- Parameters:
stateToken
- state token for current transactionrequestContext
- additional request headers and query parameters used for this request- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
resendActivateFactor
public AuthenticationResponse resendActivateFactor(String factorId, String stateToken, RequestContext requestContext, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
Resend an activation factor challenge to a user. Factors that require the challenge sent to the user (push, call, sms, etc) may need to be resent to ensure delivery.- Specified by:
resendActivateFactor
in interfaceAuthenticationClient
- Parameters:
factorId
- id of factor returned from enrollmentstateToken
- state token for current transactionrequestContext
- additional request headers and query parameters used for this requeststateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
resendVerifyFactor
public AuthenticationResponse resendVerifyFactor(String factorId, String stateToken, RequestContext requestContext, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
Resend a factor verification challenge to a user. Factors that require the challenge sent to the user (push, call, sms, etc) may need to be resent to ensure delivery.- Specified by:
resendVerifyFactor
in interfaceAuthenticationClient
- Parameters:
factorId
- id of factor returned from enrollmentstateToken
- state token for current transactionrequestContext
- additional request headers and query parameters used for this requeststateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
sendActivationEmail
public AuthenticationResponse sendActivationEmail(String factorId, String stateToken, RequestContext requestContext, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
Sends an activation email when the user is unable to scan the QR code provided as part of an Okta Verify transaction. If for any reason the user can't scan the QR code, they can use the link provided in email or SMS to complete the transaction.- Specified by:
sendActivationEmail
in interfaceAuthenticationClient
- Parameters:
factorId
- id of factor returned from enrollmentstateToken
- state token for current transactionrequestContext
- additional request headers and query parameters used for this requeststateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
verifyActivation
public AuthenticationResponse verifyActivation(String factorId, String stateToken, RequestContext requestContext, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
Returns the state of factor's activation. Some factors (Push, Duo, etc) depend on a user action, this method can be used to poll the state of the a factor's activation and transition to the next state when completed.- Specified by:
verifyActivation
in interfaceAuthenticationClient
- Parameters:
stateToken
- state token for current transactionrequestContext
- additional request headers and query parameters used for this requeststateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-
verifyRecoveryToken
public AuthenticationResponse verifyRecoveryToken(String recoveryToken, RequestContext requestContext, AuthenticationStateHandler stateHandler) throws AuthenticationException Description copied from interface:AuthenticationClient
Validates a recovery token that was distributed to the end user to continue the recovery transaction.- Specified by:
verifyRecoveryToken
in interfaceAuthenticationClient
- Parameters:
recoveryToken
- Recovery token that was distributed to the end user via out-of-band mechanism such as emailrequestContext
- additional request headers and query parameters used for this requeststateHandler
- State handler that handles the resulting status change corresponding to the Okta authentication state machine- Returns:
- An authentication response
- Throws:
AuthenticationException
- any other authentication related error
-