public class AuthenticationController
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
AuthenticationController.Builder |
Modifier and Type | Method and Description |
---|---|
AuthorizeUrl |
buildAuthorizeUrl(javax.servlet.http.HttpServletRequest request,
java.lang.String redirectUri)
Pre builds an Auth0 Authorize Url with the given redirect URI using a random state and a random nonce if applicable.
|
void |
doNotSendTelemetry()
Disable sending the Telemetry header on every request to the Auth0 API
|
Tokens |
handle(javax.servlet.http.HttpServletRequest request)
Processes a request validating the received parameters and performs a Code Exchange or a Token's Signature Verification,
depending on the chosen Response Type, to finally obtain a set of
Tokens . |
static AuthenticationController.Builder |
newBuilder(java.lang.String domain,
java.lang.String clientId,
java.lang.String clientSecret)
Create a new
AuthenticationController.Builder instance to configure the AuthenticationController response type and algorithm used on the verification. |
void |
setLoggingEnabled(boolean enabled)
Whether to enable or not the HTTP Logger for every Request and Response.
|
public static AuthenticationController.Builder newBuilder(java.lang.String domain, java.lang.String clientId, java.lang.String clientSecret)
AuthenticationController.Builder
instance to configure the AuthenticationController
response type and algorithm used on the verification.
By default it will request response type 'code' and later perform the Code Exchange, but if the response type is changed to 'token' it will handle
the Implicit Grant using the HS256 algorithm with the Client Secret as secret.domain
- the Auth0 domainclientId
- the Auth0 application's client idclientSecret
- the Auth0 application's client secretpublic void setLoggingEnabled(boolean enabled)
enabled
- whether to enable the HTTP logger or not.public void doNotSendTelemetry()
public Tokens handle(javax.servlet.http.HttpServletRequest request) throws IdentityVerificationException
Tokens
.request
- the received request to process.InvalidRequestException
- if the error is result of making an invalid authentication request.IdentityVerificationException
- if an error occurred while verifying the request tokens.public AuthorizeUrl buildAuthorizeUrl(javax.servlet.http.HttpServletRequest request, java.lang.String redirectUri)
request
- the caller request. Used to keep the session context.redirectUri
- the url to call back with the authentication result.