Package com.auth0
Class AuthenticationController.Builder
java.lang.Object
com.auth0.AuthenticationController.Builder
- Enclosing class:
- AuthenticationController
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Create a newAuthenticationController
instance that will handle both Code Grant and Implicit Grant flows using either Code Exchange or Token Signature verification.withAuthenticationMaxAge
(Integer maxAge) Sets the allowable elapsed time in seconds since the last time user was authenticated.withClockSkew
(Integer clockSkew) Sets the clock-skew or leeway value to use in the ID Token verification.withHttpOptions
(com.auth0.client.HttpOptions httpOptions) Customize certain aspects of the underlying HTTP client networking library, such as timeouts and proxy configuration.withInvitation
(String invitation) Sets the invitation query string parameter to join an organization.withJwkProvider
(com.auth0.jwk.JwkProvider jwkProvider) Sets the Jwk Provider that will return the Public Key required to verify the token in case of Implicit Grant flows.withLegacySameSiteCookie
(boolean useLegacySameSiteCookie) Sets whether fallback cookies will be set for clients that do not support SameSite=None cookie attribute.withOrganization
(String organization) Sets the organization query string parameter value used to login to an organization.withResponseType
(String responseType) Change the response type to request in the Authorization step.
-
Method Details
-
withHttpOptions
Customize certain aspects of the underlying HTTP client networking library, such as timeouts and proxy configuration.- Parameters:
httpOptions
- a non-nullHttpOptions
- Returns:
- this same builder instance.
-
withResponseType
Change the response type to request in the Authorization step. Default value is 'code'.- Parameters:
responseType
- the response type to request. Any combination of 'code', 'token' and 'id_token' but 'token id_token' is allowed, using a space as separator.- Returns:
- this same builder instance.
-
withJwkProvider
Sets the Jwk Provider that will return the Public Key required to verify the token in case of Implicit Grant flows. This is required if the Auth0 Application is signing the tokens with the RS256 algorithm.- Parameters:
jwkProvider
- a valid Jwk provider.- Returns:
- this same builder instance.
-
withClockSkew
Sets the clock-skew or leeway value to use in the ID Token verification. The value must be in seconds. Defaults to 60 seconds.- Parameters:
clockSkew
- the clock-skew to use for ID Token verification, in seconds.- Returns:
- this same builder instance.
-
withAuthenticationMaxAge
Sets the allowable elapsed time in seconds since the last time user was authenticated. By default there is no limit.- Parameters:
maxAge
- the max age of the authentication, in seconds.- Returns:
- this same builder instance.
-
withLegacySameSiteCookie
Sets whether fallback cookies will be set for clients that do not support SameSite=None cookie attribute. The SameSite Cookie attribute will only be set to "None" if the reponseType includes "id_token". By default this is true.- Parameters:
useLegacySameSiteCookie
- whether fallback auth-based cookies should be set.- Returns:
- this same builder instance.
-
withOrganization
Sets the organization query string parameter value used to login to an organization.- Parameters:
organization
- The ID of the organization to log the user in to.- Returns:
- the builder instance.
-
withInvitation
Sets the invitation query string parameter to join an organization. If using this, you must also specify the organization using withOrganization(String).- Parameters:
invitation
- The ID of the invitation to accept. This is available on the URL that is provided when accepting an invitation.- Returns:
- the builder instance.
-
build
Create a newAuthenticationController
instance that will handle both Code Grant and Implicit Grant flows using either Code Exchange or Token Signature verification.- Returns:
- a new instance of
AuthenticationController
. - Throws:
UnsupportedOperationException
- if the Implicit Grant is chosen and the environment doesn't support UTF-8 encoding.
-