Share via


BearerTokenExtensions.AddBearerToken Method

Definition

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

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

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

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

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.

Applies to