Table of Contents

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

Constructors

AuthorizationUrlBuilder(string)

Initializes a new instance of the AuthorizationUrlBuilder class.

public AuthorizationUrlBuilder(string baseUrl)

Parameters

baseUrl string

Base URL of the Authentication API represented as a string.

AuthorizationUrlBuilder(Uri)

Initializes a new instance of the AuthorizationUrlBuilder class.

public AuthorizationUrlBuilder(Uri baseUrl)

Parameters

baseUrl Uri

Base URL of the Authentication API represented as a Uri.

Methods

WithAudience(string)

Adds the audience query string parameter to request API access.

public AuthorizationUrlBuilder WithAudience(string audience)

Parameters

audience string

Audience 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 string

Client 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 string

Name 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 string

Connection 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 string

The 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 string

The nonce.

Returns

AuthorizationUrlBuilder

Current AuthorizationUrlBuilder to allow fluent configuration.

Remarks

WithOrganization(string)

Adds the organization query string parameter.

public AuthorizationUrlBuilder WithOrganization(string organization)

Parameters

organization string

The 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 string

URI 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

uri Uri

Uri to redirect to.

Returns

AuthorizationUrlBuilder

Current AuthorizationUrlBuilder to allow fluent configuration.

WithResponseMode(AuthorizationResponseMode)

Adds the response_mode query string parameter.

public AuthorizationUrlBuilder WithResponseMode(AuthorizationResponseMode responseMode)

Parameters

responseMode AuthorizationResponseMode

Response mode to use.

Returns

AuthorizationUrlBuilder

The AuthorizationUrlBuilder.

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 string

Scopes 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 string

State value to be passed back on successful authorization.

Returns

AuthorizationUrlBuilder

Current AuthorizationUrlBuilder to allow fluent configuration.