Class AuthorizationUrlBuilder
- Namespace
- Auth0.AuthenticationApi.Builders
- Assembly
- Auth0.AuthenticationApi.dll
Builder class used to fluently construct an authorization URL.
public class AuthorizationUrlBuilder : UrlBuilderBase<AuthorizationUrlBuilder>
- Inheritance
-
AuthorizationUrlBuilder
- Inherited Members
Remarks
See https://auth0.com/docs/api/authentication#login for more details.
Constructors
AuthorizationUrlBuilder(string)
Initializes a new instance of the AuthorizationUrlBuilder class.
public AuthorizationUrlBuilder(string baseUrl)
Parameters
AuthorizationUrlBuilder(Uri)
Initializes a new instance of the AuthorizationUrlBuilder class.
public AuthorizationUrlBuilder(Uri baseUrl)
Parameters
Methods
WithAudience(string)
Adds the audience query string parameter to request API access.
public AuthorizationUrlBuilder WithAudience(string audience)
Parameters
audiencestringAudience to request API access for.
Returns
- AuthorizationUrlBuilder
Current AuthorizationUrlBuilder to allow fluent configuration.
WithClient(string)
Adds the client_id query string parameter specifying the Client ID of the application.
public AuthorizationUrlBuilder WithClient(string clientId)
Parameters
clientIdstringClient ID of the application.
Returns
- AuthorizationUrlBuilder
Current AuthorizationUrlBuilder to allow fluent configuration.
WithConnection(string)
Adds the connection query string parameter specifying the connection name.
public AuthorizationUrlBuilder WithConnection(string connectionName)
Parameters
connectionNamestringName of the connection.
Returns
- AuthorizationUrlBuilder
Current AuthorizationUrlBuilder to allow fluent configuration.
WithConnectionScope(string)
Adds the connection_scope query string parameter.
public AuthorizationUrlBuilder WithConnectionScope(string connectionScope)
Parameters
connectionScopestringConnection scope to be passed to the corresponding connection. Multiple scopes must be separated by a space character.
Returns
- AuthorizationUrlBuilder
Current AuthorizationUrlBuilder to allow fluent configuration.
WithConnectionScopes(params string[])
Adds the connection_scope query string parameter.
public AuthorizationUrlBuilder WithConnectionScopes(params string[] connectionScope)
Parameters
connectionScopestring[]Connection scopes to be passed to the corresponding connection.
Returns
- AuthorizationUrlBuilder
Current AuthorizationUrlBuilder to allow fluent configuration.
WithInvitation(string)
Adds the invitation query string parameter.
public AuthorizationUrlBuilder WithInvitation(string invitation)
Parameters
invitationstringThe Id of an invitation to accept. This is available from the URL that is given when participating in a user invitation flow.
Returns
- AuthorizationUrlBuilder
Current AuthorizationUrlBuilder to allow fluent configuration.
WithNonce(string)
Adds the nonce query string parameter specifying a cryptographically random nonce.
public AuthorizationUrlBuilder WithNonce(string nonce)
Parameters
noncestringThe nonce.
Returns
- AuthorizationUrlBuilder
Current AuthorizationUrlBuilder to allow fluent configuration.
Remarks
See https://auth0.com/docs/api-auth/tutorials/nonce for more details
WithOrganization(string)
Adds the organization query string parameter.
public AuthorizationUrlBuilder WithOrganization(string organization)
Parameters
organizationstringThe ID of the organization to log the user in to
Returns
- AuthorizationUrlBuilder
Current AuthorizationUrlBuilder to allow fluent configuration.
WithRedirectUrl(string)
Adds the redirect_uri query string parameter specifying the redirect URI.
public AuthorizationUrlBuilder WithRedirectUrl(string uri)
Parameters
uristringURI to redirect to.
Returns
- AuthorizationUrlBuilder
Current AuthorizationUrlBuilder to allow fluent configuration.
WithRedirectUrl(Uri)
Adds the redirect_uri query string parameter specifying the redirect URI.
public AuthorizationUrlBuilder WithRedirectUrl(Uri uri)
Parameters
Returns
- AuthorizationUrlBuilder
Current AuthorizationUrlBuilder to allow fluent configuration.
WithResponseMode(AuthorizationResponseMode)
Adds the response_mode query string parameter.
public AuthorizationUrlBuilder WithResponseMode(AuthorizationResponseMode responseMode)
Parameters
responseModeAuthorizationResponseModeResponse mode to use.
Returns
WithResponseType(params AuthorizationResponseType[])
Adds the response_type query string parameter specifying the types of responses
that the client expects.
public AuthorizationUrlBuilder WithResponseType(params AuthorizationResponseType[] responseType)
Parameters
responseTypeAuthorizationResponseType[]AuthorizationResponseType the client expects.
Returns
- AuthorizationUrlBuilder
Current AuthorizationUrlBuilder to allow fluent configuration.
WithScope(string)
Adds the scope query string parameter indicating the scopes the client wants to request.
public AuthorizationUrlBuilder WithScope(string scope)
Parameters
scopestringScopes to request. Multiple scopes must be separated by a space character.
Returns
- AuthorizationUrlBuilder
Current AuthorizationUrlBuilder to allow fluent configuration.
WithScopes(params string[])
Adds the scope query string parameter indicating the scopes the client wants to request.
public AuthorizationUrlBuilder WithScopes(params string[] scopes)
Parameters
scopesstring[]Scopes the client wants to request.
Returns
- AuthorizationUrlBuilder
Current AuthorizationUrlBuilder to allow fluent configuration.
WithState(string)
Adds the state query string parameter specifying a value to be returned on completion in
order to prevent CSRF attacks.
public AuthorizationUrlBuilder WithState(string state)
Parameters
statestringState value to be passed back on successful authorization.
Returns
- AuthorizationUrlBuilder
Current AuthorizationUrlBuilder to allow fluent configuration.