クラス SimpleUrlAuthenticationSuccessHandler

java.lang.ObjectSE
org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler
実装されたすべてのインターフェース:
AuthenticationSuccessHandler
既知の直属サブクラス
SavedRequestAwareAuthenticationSuccessHandler

public class SimpleUrlAuthenticationSuccessHandler extends AbstractAuthenticationTargetUrlRequestHandler implements AuthenticationSuccessHandler
AuthenticationSuccessHandler 。これは、認証が成功したときにユーザーが送信されるデフォルトの URL で構成できます。

使用されるロジックは parent class のロジックです。

導入:
3.0
  • コンストラクターの詳細

    • SimpleUrlAuthenticationSuccessHandler

      public SimpleUrlAuthenticationSuccessHandler()
    • SimpleUrlAuthenticationSuccessHandler

      public SimpleUrlAuthenticationSuccessHandler(StringSE defaultTargetUrl)
      基本クラスの defaultTargetUrl プロパティを設定するコンストラクター。
      パラメーター:
      defaultTargetUrl - 認証が成功した場合にユーザーがリダイレクトされる URL。
  • メソッドの詳細

    • onAuthenticationSuccess

      public void onAuthenticationSuccess(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Authentication authentication) throws IOExceptionSE, jakarta.servlet.ServletException
      親クラス handle() メソッドを呼び出してターゲット URL に転送またはリダイレクトし、次に clearAuthenticationAttributes() を呼び出して残りのセッションデータを削除します。
      次で指定:
      インターフェース AuthenticationSuccessHandleronAuthenticationSuccess 
      パラメーター:
      request - 成功した認証を引き起こしたリクエスト
      response - レスポンス
      authentication - 認証プロセス中に作成された Authentication オブジェクト。
      例外:
      IOExceptionSE
      jakarta.servlet.ServletException
    • clearAuthenticationAttributes

      protected final void clearAuthenticationAttributes(jakarta.servlet.http.HttpServletRequest request)
      認証プロセス中にセッションに格納された可能性がある一時的な認証関連データを削除します。