JwtBearerMiddleware Class

Bearer authentication middleware component which is added to an HTTP pipeline. This class is not created by application code directly, instead it is added by calling the the IAppBuilder UseJwtBearerAuthentication extension method.

Namespace
Microsoft.AspNetCore.Authentication.JwtBearer
Assemblies
  • Microsoft.AspNetCore.Authentication.JwtBearer

Inheritance Hierarchy

Syntax

public class JwtBearerMiddleware : AuthenticationMiddleware<JwtBearerOptions>
class Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerMiddleware

Constructors

JwtBearerMiddleware(Microsoft.AspNetCore.Http.RequestDelegate, Microsoft.Extensions.Logging.ILoggerFactory, System.Text.Encodings.Web.UrlEncoder, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.JwtBearerOptions>)

Bearer authentication component which is added to an HTTP pipeline. This constructor is not called by application code directly, instead it is added by calling the the IAppBuilder UseJwtBearerAuthentication extension method.

public JwtBearerMiddleware(RequestDelegate next, ILoggerFactory loggerFactory, UrlEncoder encoder, IOptions<JwtBearerOptions> options)

Methods

CreateHandler()

Called by the AuthenticationMiddleware base class to create a per-request handler.

Return type:Microsoft.AspNetCore.Authentication.AuthenticationHandler<Microsoft.AspNetCore.Builder.JwtBearerOptions>
Returns:A new instance of the request handler
protected override AuthenticationHandler<JwtBearerOptions> CreateHandler()