OAuthEvents Class

Default Microsoft.AspNetCore.Authentication.OAuth.IOAuthEvents implementation.

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

Syntax

public class OAuthEvents : RemoteAuthenticationEvents, IOAuthEvents, IRemoteAuthenticationEvents
class Microsoft.AspNetCore.Authentication.OAuth.OAuthEvents

Methods

CreatingTicket(Microsoft.AspNetCore.Authentication.OAuth.OAuthCreatingTicketContext)

Invoked after the provider successfully authenticates a user.

Arguments:context (Microsoft.AspNetCore.Authentication.OAuth.OAuthCreatingTicketContext) – Contains information about the login session as well as the user System.Security.Claims.ClaimsIdentity.
Return type:System.Threading.Tasks.Task
Returns:A System.Threading.Tasks.Task representing the completed operation.
public virtual Task CreatingTicket(OAuthCreatingTicketContext context)
RedirectToAuthorizationEndpoint(Microsoft.AspNetCore.Authentication.OAuth.OAuthRedirectToAuthorizationContext)

Called when a Challenge causes a redirect to authorize endpoint in the OAuth middleware.

Arguments:context (Microsoft.AspNetCore.Authentication.OAuth.OAuthRedirectToAuthorizationContext) – Contains redirect URI and Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties of the challenge.
Return type:System.Threading.Tasks.Task
public virtual Task RedirectToAuthorizationEndpoint(OAuthRedirectToAuthorizationContext context)

Properties

Microsoft.AspNetCore.Authentication.OAuth.OAuthEvents.OnCreatingTicket

Gets or sets the function that is invoked when the CreatingTicket method is invoked.

Return type:System.Func<Microsoft.AspNetCore.Authentication.OAuth.OAuthCreatingTicketContext>
public Func<OAuthCreatingTicketContext, Task> OnCreatingTicket { get; set; }
Microsoft.AspNetCore.Authentication.OAuth.OAuthEvents.OnRedirectToAuthorizationEndpoint

Gets or sets the delegate that is invoked when the RedirectToAuthorizationEndpoint method is invoked.

Return type:System.Func<Microsoft.AspNetCore.Authentication.OAuth.OAuthRedirectToAuthorizationContext>
public Func<OAuthRedirectToAuthorizationContext, Task> OnRedirectToAuthorizationEndpoint { get; set; }