Table of Contents

Class LoginAuthenticationPropertiesBuilder

Namespace
Auth0.AspNetCore.Authentication
Assembly
Auth0.AspNetCore.Authentication.dll

Builder class for AuthenticationProperties when calling login.

public class LoginAuthenticationPropertiesBuilder : BaseAuthenticationPropertiesBuilder
Inheritance
LoginAuthenticationPropertiesBuilder
Inherited Members

Remarks

Allows for Auth0 specific first-class properties when constructing an instance of AuthenticationProperties.

Constructors

LoginAuthenticationPropertiesBuilder(AuthenticationProperties?)

public LoginAuthenticationPropertiesBuilder(AuthenticationProperties? properties = null)

Parameters

properties AuthenticationProperties

Methods

Build()

Return the configured AuthenticationProperties.

public AuthenticationProperties Build()

Returns

AuthenticationProperties

The configured AuthenticationProperties

WithAudience(string)

Build the AuthenticationProperties using the provided audience to request API access.

public LoginAuthenticationPropertiesBuilder WithAudience(string audience)

Parameters

audience string

Audience to request API access for.

Returns

LoginAuthenticationPropertiesBuilder

The current LoginAuthenticationPropertiesBuilder instance.

WithInvitation(string)

Build the AuthenticationProperties using the provided invitation

public LoginAuthenticationPropertiesBuilder 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

LoginAuthenticationPropertiesBuilder

The current LoginAuthenticationPropertiesBuilder instance.

WithOrganization(string)

Build the AuthenticationProperties using the provided organization

public LoginAuthenticationPropertiesBuilder WithOrganization(string organization)

Parameters

organization string

The organization used when logging in.

Returns

LoginAuthenticationPropertiesBuilder

The current LoginAuthenticationPropertiesBuilder instance.

Remarks

  • If you provide an Organization ID (a string with the prefix org_), it will be validated against the org_id claim of your user's ID Token. The validation is case-sensitive.
  • If you provide an Organization Name (a string without the prefix org_), it will be validated against the org_name claim of your user's ID Token. The validation is case-insensitive.

WithParameter(string, string)

Build the AuthenticationProperties using a parameter that will be sent to Auth0's Authorize endpoint.

public LoginAuthenticationPropertiesBuilder WithParameter(string key, string value)

Parameters

key string

The key for the parameter.

value string

The value for the parameter.

Returns

LoginAuthenticationPropertiesBuilder

The current LoginAuthenticationPropertiesBuilder instance.

WithRedirectUri(string)

Build the AuthenticationProperties using the provided redirect URI

public LoginAuthenticationPropertiesBuilder WithRedirectUri(string redirectUri)

Parameters

redirectUri string

Full path or absolute URI to be used to redirect back to your application.

Returns

LoginAuthenticationPropertiesBuilder

The current LoginAuthenticationPropertiesBuilder instance.

Remarks

Defaults to "/" when WithRedirectUri(string) is not called while building the AuthenticationProperties.

WithScope(string)

Build the AuthenticationProperties using the provided scope.

public LoginAuthenticationPropertiesBuilder WithScope(string scope)

Parameters

scope string

Scopes to be used to request token(s). (e.g. "Scope1 Scope2 Scope3")

Returns

LoginAuthenticationPropertiesBuilder

The current LoginAuthenticationPropertiesBuilder instance.