Share via


OpenIdConnectEvents 類別

定義

指定 OpenIdConnectHandler 叫用的事件,讓開發人員能夠控制驗證程式。

public ref class OpenIdConnectEvents : Microsoft::AspNetCore::Authentication::RemoteAuthenticationEvents, Microsoft::AspNetCore::Authentication::OpenIdConnect::IOpenIdConnectEvents
public ref class OpenIdConnectEvents : Microsoft::AspNetCore::Authentication::RemoteAuthenticationEvents
public class OpenIdConnectEvents : Microsoft.AspNetCore.Authentication.RemoteAuthenticationEvents, Microsoft.AspNetCore.Authentication.OpenIdConnect.IOpenIdConnectEvents
public class OpenIdConnectEvents : Microsoft.AspNetCore.Authentication.RemoteAuthenticationEvents
type OpenIdConnectEvents = class
    inherit RemoteAuthenticationEvents
    interface IOpenIdConnectEvents
    interface IRemoteAuthenticationEvents
type OpenIdConnectEvents = class
    inherit RemoteAuthenticationEvents
Public Class OpenIdConnectEvents
Inherits RemoteAuthenticationEvents
Implements IOpenIdConnectEvents
Public Class OpenIdConnectEvents
Inherits RemoteAuthenticationEvents
繼承
OpenIdConnectEvents
實作

建構函式

OpenIdConnectEvents()

指定 OpenIdConnectHandler 叫用的事件,讓開發人員能夠控制驗證程式。

屬性

OnAccessDenied

當遠端伺服器傳回拒絕存取錯誤時叫用。

(繼承來源 RemoteAuthenticationEvents)
OnAuthenticationFailed

如果要求處理期間擲回例外狀況,則叫用。 此事件之後會重新擲回例外狀況,除非受到抑制。

OnAuthorizationCodeReceived

如果通訊協定訊息中有授權碼,則在安全性權杖驗證之後叫用。

OnMessageReceived

第一次收到通訊協定訊息時叫用。

OnRedirectToIdentityProvider

在重新導向至識別提供者進行驗證之前叫用。 這可用來設定將透過驗證程式保存的 ProtocolMessage.State。 ProtocolMessage 也可以用來新增或自訂傳送至識別提供者的參數。

OnRedirectToIdentityProviderForSignOut

在重新導向至識別提供者以登出之前叫用。

OnRemoteFailure

發生遠端失敗時叫用。

(繼承來源 RemoteAuthenticationEvents)
OnRemoteSignOut

在 RemoteSignOutPath 上收到要求時叫用。

OnSignedOutCallbackRedirect

在遠端登出流程結束時重新導向至 SignedOutRedirectUri 之前叫用 。

OnTicketReceived

在收到遠端票證之後叫用。

(繼承來源 RemoteAuthenticationEvents)
OnTokenResponseReceived

在權杖端點的權杖兌換「授權碼」之後叫用。

OnTokenValidated

在驗證 IdToken 並產生 AuthenticationTicket 時叫用。 請注意,此事件之後會進行其他檢查,以驗證驗證流程的其他層面,例如 nonce。

OnUserInformationReceived

從 UserInfoEndpoint 擷取使用者資訊時叫用。

方法

AccessDenied(AccessDeniedContext)

當遠端伺服器傳回拒絕存取錯誤時叫用。

(繼承來源 RemoteAuthenticationEvents)
AuthenticationFailed(AuthenticationFailedContext)

如果要求處理期間擲回例外狀況,則叫用。 此事件之後會重新擲回例外狀況,除非受到抑制。

AuthorizationCodeReceived(AuthorizationCodeReceivedContext)

如果通訊協定訊息中有授權碼,則叫用 。

MessageReceived(MessageReceivedContext)

第一次收到通訊協定訊息時叫用。

RedirectToIdentityProvider(RedirectContext)

在重新導向至識別提供者進行驗證之前叫用。 這可用來設定將透過驗證程式保存的 ProtocolMessage.State。 ProtocolMessage 也可以用來新增或自訂傳送至識別提供者的參數。

RedirectToIdentityProviderForSignOut(RedirectContext)

在重新導向至識別提供者以登出之前叫用。

RemoteFailure(FailureContext)

發生遠端失敗時叫用

(繼承來源 RemoteAuthenticationEvents)
RemoteFailure(RemoteFailureContext)

發生遠端失敗時叫用。

(繼承來源 RemoteAuthenticationEvents)
RemoteSignOut(RemoteSignOutContext)

在 RemoteSignOutPath 上收到要求時叫用。

SignedOutCallbackRedirect(RemoteSignOutContext)

在遠端登出流程結束時重新導向至 SignedOutRedirectUri 之前叫用 。

TicketReceived(TicketReceivedContext)

在收到遠端票證之後叫用。

(繼承來源 RemoteAuthenticationEvents)
TokenResponseReceived(TokenResponseReceivedContext)

在授權碼兌換權杖端點上的權杖之後叫用。

TokenValidated(TokenValidatedContext)

在驗證 IdToken 並產生 AuthenticationTicket 時叫用。 請注意,此事件之後會進行其他檢查,以驗證驗證流程的其他層面,例如 nonce。

UserInformationReceived(UserInformationReceivedContext)

從 UserInfoEndpoint 擷取使用者資訊時叫用。

適用於