JwtBearerAppBuilderExtensions 类

定义

用于将 OpenIdConnect Bearer 身份验证功能添加到 HTTP 应用程序管道的扩展方法。

public ref class JwtBearerAppBuilderExtensions abstract sealed
public static class JwtBearerAppBuilderExtensions
type JwtBearerAppBuilderExtensions = class
Public Module JwtBearerAppBuilderExtensions
继承
JwtBearerAppBuilderExtensions

方法

UseJwtBearerAuthentication(IApplicationBuilder)
已过时.
已过时.

UseJwtBearerAuthentication 已过时。 使用 AddAuthentication () 配置 JwtBearer 身份验证。ConfigureServices 中的 AddJwtBearer。 有关详细信息,请参阅 https://go.microsoft.com/fwlink/?linkid=845470

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)
已过时.
已过时.

UseJwtBearerAuthentication 已过时。 使用 AddAuthentication () 配置 JwtBearer 身份验证。ConfigureServices 中的 AddJwtBearer。 有关详细信息,请参阅 https://go.microsoft.com/fwlink/?linkid=845470

UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)

JwtBearerMiddleware 中间件添加到指定的 IApplicationBuilder中,这将启用持有者令牌处理功能。 此中间件可理解请求标头中显示的适当格式和安全令牌。 如果 Options.AuthenticationMode 处于活动状态,则持有者令牌中的声明将添加到当前请求的 IPrincipal 用户。 如果 Options.AuthenticationMode 为 Passive,则不会修改当前请求,但可以随时使用 IAuthenticationManager AuthenticateAsync 从请求的持有者令牌获取声明。 另请参阅 http://tools.ietf.org/html/rfc6749

适用于