BearerTokenExtensions.AddBearerToken 方法

定义

重载

AddBearerToken(AuthenticationBuilder)

添加持有者令牌身份验证。 默认方案由 AuthenticationScheme指定。

持有者令牌可以通过调用 SignInAsync(HttpContext, String, ClaimsPrincipal)来获取。

AddBearerToken(AuthenticationBuilder, Action<BearerTokenOptions>)

添加持有者令牌身份验证。 默认方案由 AuthenticationScheme指定。

持有者令牌可以通过调用 SignInAsync(HttpContext, String, ClaimsPrincipal)来获取。

AddBearerToken(AuthenticationBuilder, String)

添加持有者令牌身份验证。

持有者令牌可以通过调用 SignInAsync(HttpContext, String, ClaimsPrincipal)来获取。

AddBearerToken(AuthenticationBuilder, String, Action<BearerTokenOptions>)

添加持有者令牌身份验证。

持有者令牌可以通过调用 SignInAsync(HttpContext, String, ClaimsPrincipal)来获取。

AddBearerToken(AuthenticationBuilder)

Source:
BearerTokenExtensions.cs

添加持有者令牌身份验证。 默认方案由 AuthenticationScheme指定。

持有者令牌可以通过调用 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

参数

返回

操作完成后对 builder 的引用。

适用于

AddBearerToken(AuthenticationBuilder, Action<BearerTokenOptions>)

Source:
BearerTokenExtensions.cs

添加持有者令牌身份验证。 默认方案由 AuthenticationScheme指定。

持有者令牌可以通过调用 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

参数

configure
Action<BearerTokenOptions>

用于配置持有者令牌身份验证选项的操作。

返回

操作完成后对 builder 的引用。

适用于

AddBearerToken(AuthenticationBuilder, String)

Source:
BearerTokenExtensions.cs

添加持有者令牌身份验证。

持有者令牌可以通过调用 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

参数

authenticationScheme
String

身份验证方案。

返回

操作完成后对 builder 的引用。

适用于

AddBearerToken(AuthenticationBuilder, String, Action<BearerTokenOptions>)

Source:
BearerTokenExtensions.cs

添加持有者令牌身份验证。

持有者令牌可以通过调用 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

参数

authenticationScheme
String

身份验证方案。

configure
Action<BearerTokenOptions>

用于配置持有者令牌身份验证选项的操作。

返回

操作完成后对 builder 的引用。

适用于