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
audience
stringAudience 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
clientId
stringClient 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
connectionName
stringName 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
connectionScope
stringConnection 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
connectionScope
string[]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
invitation
stringThe 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
nonce
stringThe 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
organization
stringThe 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
uri
stringURI 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
responseMode
AuthorizationResponseModeResponse 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
responseType
AuthorizationResponseType[]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
scope
stringScopes 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
scopes
string[]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
state
stringState value to be passed back on successful authorization.
Returns
- AuthorizationUrlBuilder
Current AuthorizationUrlBuilder to allow fluent configuration.