共用方式為


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)

來源:
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>)

來源:
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)

來源:
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>)

來源:
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 的參考。

適用於