OAuthMiddleware<TOptions> Class

An ASP.NET Core middleware for authenticating users using OAuth services.

Namespace
Microsoft.AspNetCore.Authentication.OAuth
Assemblies
  • Microsoft.AspNetCore.Authentication.OAuth

Inheritance Hierarchy

Syntax

public class OAuthMiddleware<TOptions> : AuthenticationMiddleware<TOptions> where TOptions : OAuthOptions, new ()
class Microsoft.AspNetCore.Authentication.OAuth.OAuthMiddleware<TOptions>

Constructors

OAuthMiddleware(Microsoft.AspNetCore.Http.RequestDelegate, Microsoft.AspNetCore.DataProtection.IDataProtectionProvider, Microsoft.Extensions.Logging.ILoggerFactory, System.Text.Encodings.Web.UrlEncoder, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Authentication.SharedAuthenticationOptions>, Microsoft.Extensions.Options.IOptions<TOptions>)

Initializes a new Microsoft.AspNetCore.Authentication.OAuth.OAuthMiddleware`1.

Arguments:
public OAuthMiddleware(RequestDelegate next, IDataProtectionProvider dataProtectionProvider, ILoggerFactory loggerFactory, UrlEncoder encoder, IOptions<SharedAuthenticationOptions> sharedOptions, IOptions<TOptions> options)

Properties

Microsoft.AspNetCore.Authentication.OAuth.OAuthMiddleware<TOptions>.Backchannel
Return type:System.Net.Http.HttpClient
protected HttpClient Backchannel { get; }

Methods

CreateHandler()

Provides the Microsoft.AspNetCore.Authentication.AuthenticationHandler`1 object for processing authentication-related requests.

Return type:Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>
Returns:An Microsoft.AspNetCore.Authentication.AuthenticationHandler`1 configured with the Microsoft.AspNetCore.Builder.OAuthOptions supplied to the constructor.
protected override AuthenticationHandler<TOptions> CreateHandler()