public class IDXAuthenticationWrapper
extends java.lang.Object
| Constructor and Description |
|---|
IDXAuthenticationWrapper()
Creates
IDXAuthenticationWrapper instance. |
IDXAuthenticationWrapper(java.lang.String issuer,
java.lang.String clientId,
java.lang.String clientSecret,
java.util.Set<java.lang.String> scopes,
java.lang.String redirectUri)
Creates
IDXAuthenticationWrapper instance. |
| Modifier and Type | Method and Description |
|---|---|
AuthenticationResponse |
authenticate(AuthenticationOptions authenticationOptions,
ProceedContext proceedContext)
Authenticate user with the supplied Authentication options (username and password) and
returns the Authentication response object that contains:
- IDX Client context
- Token (access_token/id_token/refresh_token) object
- Authentication status
|
AuthenticationResponse |
begin()
Begin flow without any recovery or activation token or request context.
|
AuthenticationResponse |
begin(RequestContext requestContext)
Begin flow with
RequestContext reference. |
AuthenticationResponse |
beginPasswordRecovery(java.lang.String token,
RequestContext requestContext)
Begin password recovery flow with a recovery token.
|
AuthenticationResponse |
beginUserActivation(java.lang.String token,
RequestContext requestContext)
Begin password recovery flow with an activation token.
|
AuthenticationResponse |
cancel(ProceedContext proceedContext)
Cancel transaction.
|
AuthenticationResponse |
enrollAuthenticator(ProceedContext proceedContext,
java.lang.String authenticatorId) |
AuthenticationResponse |
fetchSignUpFormValues(ProceedContext proceedContext)
Populate UI form values for signing up a new user.
|
AuthenticationResponse |
fetchTokenWithInteractionCode(ProceedContext proceedContext,
java.lang.String interactionCode)
Exchange interaction code for token.
|
IDXClientContext |
getClientContext()
Get IDX client context by calling interact endpoint.
|
PollInfo |
getPollInfo(AuthenticationResponse authenticationResponse)
Helper to get polling information from authentication response.
|
AuthenticationResponse |
introspect(IDXClientContext clientContext)
Introspect to get the current state of the authentication.
|
boolean |
isSkipAuthenticatorPresent(ProceedContext proceedContext)
Helper to check if we have optional authenticators to skip in current remediation step.
|
AuthenticationResponse |
poll(ProceedContext proceedContext)
Handle Polling.
|
AuthenticationResponse |
recoverPassword(java.lang.String username,
ProceedContext proceedContext)
Recover Password with the supplied username.
|
AuthenticationResponse |
register(ProceedContext proceedContext,
UserProfile userProfile)
Register new user with the supplied user profile reference.
|
AuthenticationResponse |
resend(ProceedContext proceedContext)
Resend code.
|
void |
revokeToken(TokenType tokenType,
java.lang.String token)
Revoke the oauth2 token.
|
AuthenticationResponse |
selectAuthenticator(ProceedContext proceedContext,
Authenticator authenticator)
Select authenticator of the supplied type.
|
AuthenticationResponse |
selectFactor(ProceedContext proceedContext,
Authenticator.Factor factor)
Select authenticator of the supplied type.
|
AuthenticationResponse |
skipAuthenticatorEnrollment(ProceedContext proceedContext)
Skip optional authenticator enrollment.
|
AuthenticationResponse |
submitPhoneAuthenticator(ProceedContext proceedContext,
java.lang.String phone,
Authenticator.Factor factor)
Submit phone authenticator enrollment with the provided phone number.
|
AuthenticationResponse |
verifyAuthenticator(ProceedContext proceedContext,
VerifyAuthenticatorAnswer verifyAuthenticatorAnswer)
Verify Authenticator with the supplied authenticator options.
|
AuthenticationResponse |
verifyAuthenticator(ProceedContext proceedContext,
VerifyAuthenticatorOptions verifyAuthenticatorOptions)
Verify Authenticator with the supplied authenticator options.
|
AuthenticationResponse |
verifyAuthenticator(ProceedContext proceedContext,
VerifyChannelDataOptions verifyChannelDataOptions) |
com.okta.commons.http.Response |
verifyEmailToken(java.lang.String token)
Helper to verify the token query parameter contained in the link of user verification email.
|
AuthenticationResponse |
verifyWebAuthn(ProceedContext proceedContext,
WebAuthnRequest webauthnRequest)
Verify Webauthn Authenticator.
|
public IDXAuthenticationWrapper()
IDXAuthenticationWrapper instance.public IDXAuthenticationWrapper(java.lang.String issuer,
java.lang.String clientId,
java.lang.String clientSecret,
java.util.Set<java.lang.String> scopes,
java.lang.String redirectUri)
IDXAuthenticationWrapper instance.issuer - the issuer urlclientId - the client idclientSecret - the client secretscopes - the set of scopesredirectUri - the redirect uripublic AuthenticationResponse authenticate(AuthenticationOptions authenticationOptions, ProceedContext proceedContext)
Note: This requires 'Password' as the ONLY required factor in app Sign-on policy configuration.
authenticationOptions - the Authenticator optionsproceedContext - the proceed context for the transactionpublic AuthenticationResponse recoverPassword(java.lang.String username, ProceedContext proceedContext)
username - the usernameproceedContext - the proceed contextpublic AuthenticationResponse register(ProceedContext proceedContext, UserProfile userProfile)
proceedContext - the ProceedContextuserProfile - the user profilepublic AuthenticationResponse selectAuthenticator(ProceedContext proceedContext, Authenticator authenticator)
proceedContext - the ProceedContextauthenticator - the authenticatorpublic AuthenticationResponse selectFactor(ProceedContext proceedContext, Authenticator.Factor factor)
proceedContext - the ProceedContextfactor - the factorpublic AuthenticationResponse enrollAuthenticator(ProceedContext proceedContext, java.lang.String authenticatorId)
public AuthenticationResponse verifyAuthenticator(ProceedContext proceedContext, VerifyAuthenticatorOptions verifyAuthenticatorOptions)
proceedContext - the ProceedContextverifyAuthenticatorOptions - verify authenticator optionspublic AuthenticationResponse verifyAuthenticator(ProceedContext proceedContext, VerifyAuthenticatorAnswer verifyAuthenticatorAnswer)
proceedContext - the ProceedContextverifyAuthenticatorAnswer - the verify Authenticator answerpublic AuthenticationResponse verifyAuthenticator(ProceedContext proceedContext, VerifyChannelDataOptions verifyChannelDataOptions)
public AuthenticationResponse verifyWebAuthn(ProceedContext proceedContext, WebAuthnRequest webauthnRequest)
proceedContext - the ProceedContextwebauthnRequest - objectpublic AuthenticationResponse submitPhoneAuthenticator(ProceedContext proceedContext, java.lang.String phone, Authenticator.Factor factor)
proceedContext - the ProceedContextphone - the phone numberfactor - factorpublic AuthenticationResponse skipAuthenticatorEnrollment(ProceedContext proceedContext)
proceedContext - the ProceedContextpublic AuthenticationResponse resend(ProceedContext proceedContext)
proceedContext - the ProceedContextpublic AuthenticationResponse cancel(ProceedContext proceedContext)
proceedContext - the ProceedContextpublic AuthenticationResponse poll(ProceedContext proceedContext)
proceedContext - the ProceedContextpublic IDXClientContext getClientContext() throws ProcessingException
This function can be used by the client applications to get a handle
of IDXClientContext which can be used to reenter/resume the flow.
ProcessingException - if the backend interact API call failspublic void revokeToken(TokenType tokenType, java.lang.String token)
tokenType - the token type (access|refresh)token - the tokenpublic AuthenticationResponse introspect(IDXClientContext clientContext)
clientContext - the client contextpublic AuthenticationResponse fetchSignUpFormValues(ProceedContext proceedContext)
proceedContext - the proceedContextpublic com.okta.commons.http.Response verifyEmailToken(java.lang.String token)
throws ProcessingException
token - the token string.ProcessingException - when there is an errorpublic PollInfo getPollInfo(AuthenticationResponse authenticationResponse)
authenticationResponse - the authentication responsepublic boolean isSkipAuthenticatorPresent(ProceedContext proceedContext)
proceedContext - the ProceedContextpublic AuthenticationResponse begin()
public AuthenticationResponse begin(RequestContext requestContext)
RequestContext reference.requestContext - the RequestContextpublic AuthenticationResponse beginPasswordRecovery(java.lang.String token, RequestContext requestContext)
token - recovery tokenrequestContext - request context (optional)public AuthenticationResponse beginUserActivation(java.lang.String token, RequestContext requestContext)
token - activation tokenrequestContext - request context (optional)public AuthenticationResponse fetchTokenWithInteractionCode(ProceedContext proceedContext, java.lang.String interactionCode)
proceedContext - proceed contextinteractionCode - interaction codeCopyright © 2020-2022 Okta. All Rights Reserved.