クラス 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) 新しいインスタンスを作成しますメソッドのサマリー
修飾子と型メソッド説明void
onAuthenticationFailure
(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
- 認証リクエストを拒否するためにスローされた例外。- 例外:
IOExceptionSE
jakarta.servlet.ServletException