クラス SimpleUrlAuthenticationSuccessHandler
java.lang.ObjectSE
org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler
- 実装されているすべてのインターフェース:
AuthenticationSuccessHandler
public class SimpleUrlAuthenticationSuccessHandler
extends AbstractAuthenticationTargetUrlRequestHandler
implements AuthenticationSuccessHandler
AuthenticationSuccessHandler 。これは、認証が成功したときにユーザーが送信されるデフォルトの URL で構成できます。
使用されるロジックは parent class のロジックです。
- 導入:
- 3.0
フィールドのサマリー
クラス org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler から継承されたフィールド
loggerコンストラクターの概要
コンストラクターコンストラクター説明SimpleUrlAuthenticationSuccessHandler(StringSE defaultTargetUrl) 基本クラスの defaultTargetUrl プロパティを設定するコンストラクター。メソッドのサマリー
修飾子と型メソッド説明protected final voidclearAuthenticationAttributes(jakarta.servlet.http.HttpServletRequest request) 認証プロセス中にセッションに格納された可能性がある一時的な認証関連データを削除します。voidonAuthenticationSuccess(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Authentication authentication) 親クラスhandle()メソッドを呼び出してターゲット URL に転送またはリダイレクトし、次にclearAuthenticationAttributes()を呼び出して残りのセッションデータを削除します。クラス org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler から継承されたメソッド
determineTargetUrl, determineTargetUrl, getDefaultTargetUrl, getRedirectStrategy, getTargetUrlParameter, handle, isAlwaysUseDefaultTargetUrl, setAlwaysUseDefaultTargetUrl, setDefaultTargetUrl, setRedirectStrategy, setTargetUrlParameter, setUseRefererクラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSEインターフェース org.springframework.security.web.authentication.AuthenticationSuccessHandler から継承されたメソッド
onAuthenticationSuccess
コンストラクターの詳細
SimpleUrlAuthenticationSuccessHandler
public SimpleUrlAuthenticationSuccessHandler()SimpleUrlAuthenticationSuccessHandler
基本クラスの 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()を呼び出して残りのセッションデータを削除します。- 次で指定:
- インターフェース
AuthenticationSuccessHandlerのonAuthenticationSuccess - パラメーター:
request- 成功した認証を引き起こしたリクエストresponse- レスポンスauthentication- 認証プロセス中に作成された Authentication オブジェクト。- 例外:
IOExceptionSEjakarta.servlet.ServletException
clearAuthenticationAttributes
protected final void clearAuthenticationAttributes(jakarta.servlet.http.HttpServletRequest request) 認証プロセス中にセッションに格納された可能性がある一時的な認証関連データを削除します。