BearerTokenExtensions.AddBearerToken Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddBearerToken(AuthenticationBuilder) |
Adds bearer token authentication. The default scheme is specified by AuthenticationScheme. Bearer tokens can be obtained by calling SignInAsync(HttpContext, String, ClaimsPrincipal). |
AddBearerToken(AuthenticationBuilder, Action<BearerTokenOptions>) |
Adds bearer token authentication. The default scheme is specified by AuthenticationScheme. Bearer tokens can be obtained by calling SignInAsync(HttpContext, String, ClaimsPrincipal). |
AddBearerToken(AuthenticationBuilder, String) |
Adds bearer token authentication. Bearer tokens can be obtained by calling SignInAsync(HttpContext, String, ClaimsPrincipal). |
AddBearerToken(AuthenticationBuilder, String, Action<BearerTokenOptions>) |
Adds bearer token authentication. Bearer tokens can be obtained by calling SignInAsync(HttpContext, String, ClaimsPrincipal). |
AddBearerToken(AuthenticationBuilder)
- Source:
- BearerTokenExtensions.cs
Adds bearer token authentication. The default scheme is specified by AuthenticationScheme.
Bearer tokens can be obtained by calling SignInAsync(HttpContext, String, ClaimsPrincipal).
public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddBearerToken (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder);
static member AddBearerToken : Microsoft.AspNetCore.Authentication.AuthenticationBuilder -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddBearerToken (builder As AuthenticationBuilder) As AuthenticationBuilder
Parameters
- builder
- AuthenticationBuilder
Returns
A reference to builder
after the operation has completed.
Applies to
AddBearerToken(AuthenticationBuilder, Action<BearerTokenOptions>)
- Source:
- BearerTokenExtensions.cs
Adds bearer token authentication. The default scheme is specified by AuthenticationScheme.
Bearer tokens can be obtained by calling SignInAsync(HttpContext, String, ClaimsPrincipal).
public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddBearerToken (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, Action<Microsoft.AspNetCore.Authentication.BearerToken.BearerTokenOptions> configure);
static member AddBearerToken : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * Action<Microsoft.AspNetCore.Authentication.BearerToken.BearerTokenOptions> -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddBearerToken (builder As AuthenticationBuilder, configure As Action(Of BearerTokenOptions)) As AuthenticationBuilder
Parameters
- builder
- AuthenticationBuilder
- configure
- Action<BearerTokenOptions>
Action used to configure the bearer token authentication options.
Returns
A reference to builder
after the operation has completed.
Applies to
AddBearerToken(AuthenticationBuilder, String)
- Source:
- BearerTokenExtensions.cs
Adds bearer token authentication.
Bearer tokens can be obtained by calling SignInAsync(HttpContext, String, ClaimsPrincipal).
public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddBearerToken (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme);
static member AddBearerToken : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * string -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddBearerToken (builder As AuthenticationBuilder, authenticationScheme As String) As AuthenticationBuilder
Parameters
- builder
- AuthenticationBuilder
- authenticationScheme
- String
The authentication scheme.
Returns
A reference to builder
after the operation has completed.
Applies to
AddBearerToken(AuthenticationBuilder, String, Action<BearerTokenOptions>)
- Source:
- BearerTokenExtensions.cs
Adds bearer token authentication.
Bearer tokens can be obtained by calling SignInAsync(HttpContext, String, ClaimsPrincipal).
public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddBearerToken (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme, Action<Microsoft.AspNetCore.Authentication.BearerToken.BearerTokenOptions> configure);
static member AddBearerToken : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * string * Action<Microsoft.AspNetCore.Authentication.BearerToken.BearerTokenOptions> -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddBearerToken (builder As AuthenticationBuilder, authenticationScheme As String, configure As Action(Of BearerTokenOptions)) As AuthenticationBuilder
Parameters
- builder
- AuthenticationBuilder
- authenticationScheme
- String
The authentication scheme.
- configure
- Action<BearerTokenOptions>
Action used to configure the bearer token authentication options.
Returns
A reference to builder
after the operation has completed.