OAuthAppBuilderExtensions Class

Extension methods to add OAuth 2.0 authentication capabilities to an HTTP application pipeline.

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

Syntax

public class OAuthAppBuilderExtensions
class Microsoft.AspNetCore.Builder.OAuthAppBuilderExtensions

Methods

UseOAuthAuthentication(Microsoft.AspNetCore.Builder.IApplicationBuilder)

Adds the Microsoft.AspNetCore.Authentication.OAuth.OAuthMiddleware`1 middleware to the specified Microsoft.AspNetCore.Builder.IApplicationBuilder, which enables OAuth 2.0 authentication capabilities.

Arguments:app (Microsoft.AspNetCore.Builder.IApplicationBuilder) – The Microsoft.AspNetCore.Builder.IApplicationBuilder to add the middleware to.
Return type:Microsoft.AspNetCore.Builder.IApplicationBuilder
Returns:A reference to this instance after the operation has completed.
public static IApplicationBuilder UseOAuthAuthentication(this IApplicationBuilder app)
UseOAuthAuthentication(Microsoft.AspNetCore.Builder.IApplicationBuilder, Microsoft.AspNetCore.Builder.OAuthOptions)

Adds the Microsoft.AspNetCore.Authentication.OAuth.OAuthMiddleware`1 middleware to the specified Microsoft.AspNetCore.Builder.IApplicationBuilder, which enables OAuth 2.0 authentication capabilities.

Arguments:
Return type:

Microsoft.AspNetCore.Builder.IApplicationBuilder

Returns:

A reference to this instance after the operation has completed.

public static IApplicationBuilder UseOAuthAuthentication(this IApplicationBuilder app, OAuthOptions options)