共用方式為


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 參考。

適用於