クラス HttpStatusEntryPoint
java.lang.ObjectSE
org.springframework.security.web.authentication.HttpStatusEntryPoint
- 実装されているすべてのインターフェース:
AuthenticationEntryPoint
レスポンスとして汎用
HttpStatus を送信する AuthenticationEntryPoint。ブラウザーがレスポンスをインターセプトするため、基本認証を使用できない JavaScript クライアントに役立ちます。- 導入:
- 4.0
コンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明voidcommence(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AuthenticationException authException) 認証スキームを開始します。
コンストラクターの詳細
HttpStatusEntryPoint
public HttpStatusEntryPoint(org.springframework.http.HttpStatus httpStatus) 新しいインスタンスを作成します。- パラメーター:
httpStatus- 設定する HttpStatus
メソッドの詳細
commence
public void commence(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AuthenticationException authException) インターフェースからコピーされた説明:AuthenticationEntryPoint認証スキームを開始します。ExceptionTranslationFilterは、このメソッドを呼び出す前に、AbstractAuthenticationProcessingFilter.SPRING_SECURITY_SAVED_REQUEST_KEYという名前のHttpSession属性にリクエストされたターゲット URL を入力します。実装では、必要に応じて
ServletResponseのヘッダーを変更して、認証プロセスを開始する必要があります。- 次で指定:
- インターフェース
AuthenticationEntryPointのcommence - パラメーター:
request-AuthenticationExceptionが発生したリクエストresponse- ユーザーエージェントが認証を開始できるようにするauthException- 呼び出しの原因となった例外