JwtBearerExtensions.AddJwtBearer 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddJwtBearer(AuthenticationBuilder) |
使用默认方案 AuthenticationScheme启用 JWT-bearer 身份验证。
JWT 持有者身份验证通过从 |
AddJwtBearer(AuthenticationBuilder, Action<JwtBearerOptions>) |
使用默认方案 AuthenticationScheme启用 JWT-bearer 身份验证。
JWT 持有者身份验证通过从 |
AddJwtBearer(AuthenticationBuilder, String) |
使用预定义的方案启用 JWT-bearer 身份验证。
JWT 持有者身份验证通过从 |
AddJwtBearer(AuthenticationBuilder, String, Action<JwtBearerOptions>) |
使用指定的方案启用 JWT-bearer 身份验证。
JWT 持有者身份验证通过从 |
AddJwtBearer(AuthenticationBuilder, String, String, Action<JwtBearerOptions>) |
使用指定的方案启用 JWT-bearer 身份验证。
JWT 持有者身份验证通过从 |
AddJwtBearer(AuthenticationBuilder)
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
使用默认方案 AuthenticationScheme启用 JWT-bearer 身份验证。
JWT 持有者身份验证通过从 Authorization
请求标头中提取并验证 JWT 令牌来执行身份验证。
public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddJwtBearer (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder);
static member AddJwtBearer : Microsoft.AspNetCore.Authentication.AuthenticationBuilder -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddJwtBearer (builder As AuthenticationBuilder) As AuthenticationBuilder
参数
返回
操作完成后对 builder
的引用。
适用于
AddJwtBearer(AuthenticationBuilder, Action<JwtBearerOptions>)
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
使用默认方案 AuthenticationScheme启用 JWT-bearer 身份验证。
JWT 持有者身份验证通过从 Authorization
请求标头中提取并验证 JWT 令牌来执行身份验证。
public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddJwtBearer (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, Action<Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerOptions> configureOptions);
static member AddJwtBearer : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * Action<Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerOptions> -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddJwtBearer (builder As AuthenticationBuilder, configureOptions As Action(Of JwtBearerOptions)) As AuthenticationBuilder
参数
- configureOptions
- Action<JwtBearerOptions>
允许配置 JwtBearerOptions的委托。
返回
操作完成后对 builder
的引用。
适用于
AddJwtBearer(AuthenticationBuilder, String)
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
使用预定义的方案启用 JWT-bearer 身份验证。
JWT 持有者身份验证通过从 Authorization
请求标头中提取并验证 JWT 令牌来执行身份验证。
public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddJwtBearer (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme);
static member AddJwtBearer : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * string -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddJwtBearer (builder As AuthenticationBuilder, authenticationScheme As String) As AuthenticationBuilder
参数
- authenticationScheme
- String
身份验证方案。
返回
操作完成后对 builder
的引用。
适用于
AddJwtBearer(AuthenticationBuilder, String, Action<JwtBearerOptions>)
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
使用指定的方案启用 JWT-bearer 身份验证。
JWT 持有者身份验证通过从 Authorization
请求标头中提取并验证 JWT 令牌来执行身份验证。
public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddJwtBearer (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme, Action<Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerOptions> configureOptions);
static member AddJwtBearer : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * string * Action<Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerOptions> -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddJwtBearer (builder As AuthenticationBuilder, authenticationScheme As String, configureOptions As Action(Of JwtBearerOptions)) As AuthenticationBuilder
参数
- authenticationScheme
- String
身份验证方案。
- configureOptions
- Action<JwtBearerOptions>
允许配置 JwtBearerOptions的委托。
返回
操作完成后对 builder
的引用。
适用于
AddJwtBearer(AuthenticationBuilder, String, String, Action<JwtBearerOptions>)
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
- Source:
- JwtBearerExtensions.cs
使用指定的方案启用 JWT-bearer 身份验证。
JWT 持有者身份验证通过从 Authorization
请求标头中提取并验证 JWT 令牌来执行身份验证。
public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddJwtBearer (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme, string displayName, Action<Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerOptions> configureOptions);
public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddJwtBearer (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme, string? displayName, Action<Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerOptions> configureOptions);
static member AddJwtBearer : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * string * string * Action<Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerOptions> -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddJwtBearer (builder As AuthenticationBuilder, authenticationScheme As String, displayName As String, configureOptions As Action(Of JwtBearerOptions)) As AuthenticationBuilder
参数
- authenticationScheme
- String
身份验证方案。
- displayName
- String
身份验证处理程序的显示名称。
- configureOptions
- Action<JwtBearerOptions>
允许配置 JwtBearerOptions的委托。
返回
操作完成后对 builder
的引用。