クラス DelegatingAuthenticationFailureHandler
java.lang.ObjectSE
org.springframework.security.web.authentication.DelegatingAuthenticationFailureHandler
- 実装されているすべてのインターフェース:
AuthenticationFailureHandler
public class DelegatingAuthenticationFailureHandler
extends ObjectSE
implements AuthenticationFailureHandler
AuthenticationException の型に基づいて他の AuthenticationFailureHandler インスタンスに委譲する AuthenticationFailureHandler は、onAuthenticationFailure(HttpServletRequest, HttpServletResponse, AuthenticationException) に渡されます。- 導入:
- 4.0
コンストラクターの概要
コンストラクターコンストラクター説明DelegatingAuthenticationFailureHandler(LinkedHashMapSE<ClassSE<? extends AuthenticationException>, AuthenticationFailureHandler> handlers, AuthenticationFailureHandler defaultHandler) 新しいインスタンスを作成しますメソッドのサマリー
修飾子と型メソッド説明voidonAuthenticationFailure(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AuthenticationException exception) 認証の試行が失敗したときに呼び出されます。
コンストラクターの詳細
DelegatingAuthenticationFailureHandler
public DelegatingAuthenticationFailureHandler(LinkedHashMapSE<ClassSE<? extends AuthenticationException>, AuthenticationFailureHandler> handlers, AuthenticationFailureHandler defaultHandler) 新しいインスタンスを作成します- パラメーター:
handlers- 使用する必要があるAuthenticationFailureHandlerへのAuthenticationExceptionクラスのマップ。それぞれが指定された順序で考慮され、最初のAuthenticationFailureHandlerのみが使用されます。このパラメーターは null または空を指定できません。defaultHandler- どのハンドラーも一致しない場合に使用されるデフォルトのAuthenticationFailureHandlerこのパラメーターは null を指定できません。- 例外:
IllegalArgumentExceptionSE- 無効な引数が指定された場合
メソッドの詳細
onAuthenticationFailure
public void onAuthenticationFailure(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AuthenticationException exception) throws IOExceptionSE, jakarta.servlet.ServletException インターフェースからコピーされた説明:AuthenticationFailureHandler認証の試行が失敗したときに呼び出されます。- 次で指定:
- インターフェース
AuthenticationFailureHandlerのonAuthenticationFailure - パラメーター:
request- 認証試行が発生したリクエスト。response- レスポンス。exception- 認証リクエストを拒否するためにスローされた例外。- 例外:
IOExceptionSEjakarta.servlet.ServletException