IOpenIdConnectEvents Interface

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 interface IOpenIdConnectEvents : IRemoteAuthenticationEvents
interface Microsoft.AspNetCore.Authentication.OpenIdConnect.IOpenIdConnectEvents

Methods

AuthenticationFailed(Microsoft.AspNetCore.Authentication.OpenIdConnect.AuthenticationFailedContext)

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

Return type:System.Threading.Tasks.Task
Task AuthenticationFailed(AuthenticationFailedContext context)
AuthorizationCodeReceived(Microsoft.AspNetCore.Authentication.OpenIdConnect.AuthorizationCodeReceivedContext)

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

Return type:System.Threading.Tasks.Task
Task AuthorizationCodeReceived(AuthorizationCodeReceivedContext context)
MessageReceived(Microsoft.AspNetCore.Authentication.OpenIdConnect.MessageReceivedContext)

Invoked when a protocol message is first received.

Return type:System.Threading.Tasks.Task
Task MessageReceived(MessageReceivedContext context)
RedirectToIdentityProvider(Microsoft.AspNetCore.Authentication.OpenIdConnect.RedirectContext)

Invoked before redirecting to the identity provider to authenticate.

Return type:System.Threading.Tasks.Task
Task RedirectToIdentityProvider(RedirectContext context)
RedirectToIdentityProviderForSignOut(Microsoft.AspNetCore.Authentication.OpenIdConnect.RedirectContext)

Invoked before redirecting to the identity provider to sign out.

Return type:System.Threading.Tasks.Task
Task RedirectToIdentityProviderForSignOut(RedirectContext context)
RemoteSignOut(Microsoft.AspNetCore.Authentication.OpenIdConnect.RemoteSignOutContext)

Invoked when a request is received on the RemoteSignOutPath.

Return type:System.Threading.Tasks.Task
Task RemoteSignOut(RemoteSignOutContext context)
TokenResponseReceived(Microsoft.AspNetCore.Authentication.OpenIdConnect.TokenResponseReceivedContext)

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

Return type:System.Threading.Tasks.Task
Task TokenResponseReceived(TokenResponseReceivedContext context)
TokenValidated(Microsoft.AspNetCore.Authentication.OpenIdConnect.TokenValidatedContext)

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

Return type:System.Threading.Tasks.Task
Task TokenValidated(TokenValidatedContext context)
UserInformationReceived(Microsoft.AspNetCore.Authentication.OpenIdConnect.UserInformationReceivedContext)

Invoked when user information is retrieved from the UserInfoEndpoint.

Return type:System.Threading.Tasks.Task
Task UserInformationReceived(UserInformationReceivedContext context)