インターフェース AuthenticationSuccessHandler
- すべての既知の実装クラス:
ForwardAuthenticationSuccessHandler、HttpMessageConverterAuthenticationSuccessHandler、OAuth2AccessTokenResponseAuthenticationSuccessHandler、OidcLogoutAuthenticationSuccessHandler、ResponseHeaderSettingKerberosAuthenticationSuccessHandler、SavedRequestAwareAuthenticationSuccessHandler、SimpleUrlAuthenticationSuccessHandler
public interface AuthenticationSuccessHandler
成功したユーザー認証を処理するために使用される戦略。
実装は何でもできますが、通常の動作は次の宛先へのナビゲーションを制御することです(リダイレクトまたは転送を使用)。例: ユーザーがログインフォームを送信してログインした後、アプリケーションは、どこにリダイレクトするかを決定する必要があります(AbstractAuthenticationProcessingFilter とサブクラスを参照)。必要に応じて他のロジックも含めることができます。
- 導入:
- 3.0
メソッドのサマリー
修飾子と型メソッド説明default voidonAuthenticationSuccess(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain chain, Authentication authentication) ユーザーが正常に認証されたときに呼び出されます。voidonAuthenticationSuccess(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Authentication authentication) ユーザーが正常に認証されたときに呼び出されます。
メソッドの詳細
onAuthenticationSuccess
default void onAuthenticationSuccess(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain chain, Authentication authentication) throws IOExceptionSE, jakarta.servlet.ServletException ユーザーが正常に認証されたときに呼び出されます。- パラメーター:
request- 成功した認証を引き起こしたリクエストresponse- レスポンスchain- チェーンの他のフィルターを処理するために使用できるFilterChainauthentication- 認証プロセス中に作成された Authentication オブジェクト。- 例外:
IOExceptionSEjakarta.servlet.ServletException- 導入:
- 5.2.0
onAuthenticationSuccess
void onAuthenticationSuccess(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Authentication authentication) throws IOExceptionSE, jakarta.servlet.ServletException ユーザーが正常に認証されたときに呼び出されます。- パラメーター:
request- 成功した認証を引き起こしたリクエストresponse- レスポンスauthentication- 認証プロセス中に作成された Authentication オブジェクト。- 例外:
IOExceptionSEjakarta.servlet.ServletException