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