Class Auth0WebAppOptions
- Namespace
- Auth0.AspNetCore.Authentication
- Assembly
- Auth0.AspNetCore.Authentication.dll
Options used to configure the SDK
public class Auth0WebAppOptions
- Inheritance
-
Auth0WebAppOptions
- Inherited Members
Properties
AccessDeniedPath
Gets or sets the optional path the user agent is redirected to if the user doesn't approve the authorization demand requested by the remote server. This property is not set by default. In this case, an exception is thrown if an access_denied response is returned by the remote authorization server.
public PathString AccessDeniedPath { get; set; }
Property Value
Backchannel
Backchannel used to communicate with the Identity Provider.
public HttpClient? Backchannel { get; set; }
Property Value
CallbackPath
The path within the application to redirect the user to.
public string? CallbackPath { get; set; }
Property Value
Remarks
Processed internally by the Open Id Connect middleware.
ClientAssertionSecurityKey
Security Key to use with Client Assertion
public SecurityKey? ClientAssertionSecurityKey { get; set; }
Property Value
ClientAssertionSecurityKeyAlgorithm
Algorithm for the Security Key to use with Client Assertion
public string? ClientAssertionSecurityKeyAlgorithm { get; set; }
Property Value
ClientId
Client ID of the application.
public string ClientId { get; set; }
Property Value
ClientSecret
Client Secret of the application.
public string? ClientSecret { get; set; }
Property Value
Remarks
Required when using ResponseType set to code
or code id_token
.
CookieAuthenticationScheme
The name of the cookie scheme to use
public string CookieAuthenticationScheme { get; set; }
Property Value
Remarks
The default is AuthenticationScheme
Domain
Auth0 domain name, e.g. tenant.auth0.com.
public string Domain { get; set; }
Property Value
ForwardSignIn
If set, this specifies the target scheme that this scheme should forward SignInAsync calls to. For example Context.SignInAsync("ThisScheme") => Context.SignInAsync("ForwardSignInValue"); Set the target to the current scheme to disable forwarding and allow normal processing.
public string? ForwardSignIn { get; set; }
Property Value
ForwardSignOut
If set, this specifies the target scheme that this scheme should forward SignOutAsync calls to. For example Context.SignOutAsync("ThisScheme") => Context.SignOutAsync("ForwardSignOutValue"); Set the target to the current scheme to disable forwarding and allow normal processing.
public string? ForwardSignOut { get; set; }
Property Value
LoginParameters
Parameters to be send to Auth0's /authorize
endpoint.
public IDictionary<string, string>? LoginParameters { get; set; }
Property Value
Examples
services.AddAuth0WebAppAuthentication(options => { options.LoginParameters = new Dictionary{string, string}() { {"Test", "123" } }; });
MaxAge
If provided, will set the 'max_age' parameter with the authentication request. If the identity provider has not actively authenticated the user within the length of time specified, the user will be prompted to re-authenticate.
public TimeSpan? MaxAge { get; set; }
Property Value
OpenIdConnectEvents
Events allowing you to hook into specific moments in the OpenID Connect pipeline.
public OpenIdConnectEvents? OpenIdConnectEvents { get; set; }
Property Value
Organization
The Organization to which the users should log in to.
public string? Organization { get; set; }
Property Value
Remarks
- If you provide an Organization ID (a string with the prefix
org_
), it will be validated against theorg_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 theorg_name
claim of your user's ID Token.The validation is case-insensitive.
ResponseType
Set the ResponseType to be used.
public string? ResponseType { get; set; }
Property Value
Remarks
Supports id_token
, code
or code id_token
, defaults to id_token
when omitted.
Scope
Scopes to be used to request token(s). (e.g. "Scope1 Scope2 Scope3")
public string Scope { get; set; }
Property Value
SignInScheme
Gets or sets the authentication scheme corresponding to the middleware responsible of persisting user's identity after a successful authentication. This value typically corresponds to a cookie middleware registered in the Startup class. When omitted, DefaultSignInScheme is used as a fallback value.
public string? SignInScheme { get; set; }
Property Value
SignOutScheme
The Authentication Scheme to use with SignOut on the SignOutPath. SignInScheme will be used if this is not set.
public string? SignOutScheme { get; set; }
Property Value
SkipCookieMiddleware
Whether or not to skip adding the Cookie Middleware.
public bool SkipCookieMiddleware { get; set; }
Property Value
Remarks
Defaults to false.
UsePushedAuthorization
Sets whether to use pushed authorization requests or not.
public bool UsePushedAuthorization { get; set; }