OpenIdConnectEvents Class

Specifies events which the Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectMiddlewareinvokes to enable developer control over the authentication process.

Namespace
Microsoft.AspNetCore.Authentication.OpenIdConnect
Assemblies
  • Microsoft.AspNetCore.Authentication.OpenIdConnect

Syntax

public class OpenIdConnectEvents : RemoteAuthenticationEvents, IOpenIdConnectEvents, IRemoteAuthenticationEvents
class Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectEvents

Methods

AuthenticationFailed(Microsoft.AspNetCore.Authentication.OpenIdConnect.AuthenticationFailedContext)
Return type:System.Threading.Tasks.Task
public virtual Task AuthenticationFailed(AuthenticationFailedContext context)
AuthorizationCodeReceived(Microsoft.AspNetCore.Authentication.OpenIdConnect.AuthorizationCodeReceivedContext)
Return type:System.Threading.Tasks.Task
public virtual Task AuthorizationCodeReceived(AuthorizationCodeReceivedContext context)
MessageReceived(Microsoft.AspNetCore.Authentication.OpenIdConnect.MessageReceivedContext)
Return type:System.Threading.Tasks.Task
public virtual Task MessageReceived(MessageReceivedContext context)
RedirectToIdentityProvider(Microsoft.AspNetCore.Authentication.OpenIdConnect.RedirectContext)
Return type:System.Threading.Tasks.Task
public virtual Task RedirectToIdentityProvider(RedirectContext context)
RedirectToIdentityProviderForSignOut(Microsoft.AspNetCore.Authentication.OpenIdConnect.RedirectContext)
Return type:System.Threading.Tasks.Task
public virtual Task RedirectToIdentityProviderForSignOut(RedirectContext context)
RemoteSignOut(Microsoft.AspNetCore.Authentication.OpenIdConnect.RemoteSignOutContext)
Return type:System.Threading.Tasks.Task
public virtual Task RemoteSignOut(RemoteSignOutContext context)
TokenResponseReceived(Microsoft.AspNetCore.Authentication.OpenIdConnect.TokenResponseReceivedContext)
Return type:System.Threading.Tasks.Task
public virtual Task TokenResponseReceived(TokenResponseReceivedContext context)
TokenValidated(Microsoft.AspNetCore.Authentication.OpenIdConnect.TokenValidatedContext)
Return type:System.Threading.Tasks.Task
public virtual Task TokenValidated(TokenValidatedContext context)
UserInformationReceived(Microsoft.AspNetCore.Authentication.OpenIdConnect.UserInformationReceivedContext)
Return type:System.Threading.Tasks.Task
public virtual Task UserInformationReceived(UserInformationReceivedContext context)

Properties

Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectEvents.OnAuthenticationFailed

Invoked if exceptions are thrown during request processing. The exceptions will be re-thrown after this event unless suppressed.

Return type:System.Func<Microsoft.AspNetCore.Authentication.OpenIdConnect.AuthenticationFailedContext>
public Func<AuthenticationFailedContext, Task> OnAuthenticationFailed { get; set; }
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectEvents.OnAuthorizationCodeReceived

Invoked after security token validation if an authorization code is present in the protocol message.

Return type:System.Func<Microsoft.AspNetCore.Authentication.OpenIdConnect.AuthorizationCodeReceivedContext>
public Func<AuthorizationCodeReceivedContext, Task> OnAuthorizationCodeReceived { get; set; }
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectEvents.OnMessageReceived

Invoked when a protocol message is first received.

Return type:System.Func<Microsoft.AspNetCore.Authentication.OpenIdConnect.MessageReceivedContext>
public Func<MessageReceivedContext, Task> OnMessageReceived { get; set; }
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectEvents.OnRedirectToIdentityProvider

Invoked before redirecting to the identity provider to authenticate.

Return type:System.Func<Microsoft.AspNetCore.Authentication.OpenIdConnect.RedirectContext>
public Func<RedirectContext, Task> OnRedirectToIdentityProvider { get; set; }
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectEvents.OnRedirectToIdentityProviderForSignOut

Invoked before redirecting to the identity provider to sign out.

Return type:System.Func<Microsoft.AspNetCore.Authentication.OpenIdConnect.RedirectContext>
public Func<RedirectContext, Task> OnRedirectToIdentityProviderForSignOut { get; set; }
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectEvents.OnRemoteSignOut

Invoked when a request is received on the RemoteSignOutPath.

Return type:System.Func<Microsoft.AspNetCore.Authentication.OpenIdConnect.RemoteSignOutContext>
public Func<RemoteSignOutContext, Task> OnRemoteSignOut { get; set; }
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectEvents.OnTokenResponseReceived

Invoked after “authorization code” is redeemed for tokens at the token endpoint.

Return type:System.Func<Microsoft.AspNetCore.Authentication.OpenIdConnect.TokenResponseReceivedContext>
public Func<TokenResponseReceivedContext, Task> OnTokenResponseReceived { get; set; }
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectEvents.OnTokenValidated

Invoked when an IdToken has been validated and produced an AuthenticationTicket.

Return type:System.Func<Microsoft.AspNetCore.Authentication.OpenIdConnect.TokenValidatedContext>
public Func<TokenValidatedContext, Task> OnTokenValidated { get; set; }
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectEvents.OnUserInformationReceived

Invoked when user information is retrieved from the UserInfoEndpoint.

Return type:System.Func<Microsoft.AspNetCore.Authentication.OpenIdConnect.UserInformationReceivedContext>
public Func<UserInformationReceivedContext, Task> OnUserInformationReceived { get; set; }