Package com.auth0.client.auth
Class AuthorizeUrlBuilder
java.lang.Object
com.auth0.client.auth.AuthorizeUrlBuilder
Class that provides the methods to generate a valid Auth0 Authorize Url. It's based on the https://auth0.com/docs/api/authentication#social docs.
This class is not thread-safe:
It makes use of HashMap
for storing the parameters. Make sure to not call the builder methods
from a different or un-synchronized thread.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates a string representation of the URL with the configured parameters.withAudience(String audience)
Sets the audience value.withConnection(String connection)
Sets the connection value.withInvitation(String invitation)
Sets the invitation query string parameter to join an organization.withOrganization(String organization)
Sets the organization query string parameter value used to login to an organization.withParameter(String name, String value)
Sets an additional parameter.withResponseType(String responseType)
Sets the response type value.Sets the scope value.Sets the state value.
-
Method Details
-
withConnection
Sets the connection value.- Parameters:
connection
- connection to set- Returns:
- the builder instance
-
withAudience
Sets the audience value.- Parameters:
audience
- audience to set- Returns:
- the builder instance
-
withState
Sets the state value.- Parameters:
state
- state to set- Returns:
- the builder instance
-
withScope
Sets the scope value.- Parameters:
scope
- scope to set- Returns:
- the builder instance
-
withResponseType
Sets the response type value.- Parameters:
responseType
- response type to set- Returns:
- the 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.
-
withParameter
Sets an additional parameter.- Parameters:
name
- name of the parametervalue
- value of the parameter to set- Returns:
- the builder instance
-
build
Creates a string representation of the URL with the configured parameters.- Returns:
- the string URL
-