クラス HttpMessageConverterAuthenticationSuccessHandler

java.lang.ObjectSE
org.springframework.security.web.authentication.HttpMessageConverterAuthenticationSuccessHandler
実装されているすべてのインターフェース:
AuthenticationSuccessHandler

public final class HttpMessageConverterAuthenticationSuccessHandler extends ObjectSE implements AuthenticationSuccessHandler
リダイレクト URL と認証ステータスを含む JSON レスポンスを書き込む AuthenticationSuccessHandler { "redirectUrl": "/user/profile", "authenticated": true }
導入:
6.4
  • コンストラクターの詳細

    • HttpMessageConverterAuthenticationSuccessHandler

      public HttpMessageConverterAuthenticationSuccessHandler()
  • メソッドの詳細

    • setConverter

      public void setConverter(org.springframework.http.converter.HttpMessageConverter<ObjectSE> converter)
      レスポンスに書き込む GenericHttpMessageConverter を設定します。デフォルトは MappingJackson2HttpMessageConverter です。
      パラメーター:
      converter - 使用する GenericHttpMessageConverter。null にはできません。
    • setRequestCache

      public void setRequestCache(RequestCache requestCache)
      使用する RequestCache を設定します。デフォルトは HttpSessionRequestCache です。
      パラメーター:
      requestCache - 使用する RequestCache。null にはできません
    • onAuthenticationSuccess

      public void onAuthenticationSuccess(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Authentication authentication) throws IOExceptionSE, jakarta.servlet.ServletException
      インターフェースからコピーされた説明: AuthenticationSuccessHandler
      ユーザーが正常に認証されたときに呼び出されます。
      次で指定:
      インターフェース AuthenticationSuccessHandleronAuthenticationSuccess 
      パラメーター:
      request - 成功した認証を引き起こしたリクエスト
      response - レスポンス
      authentication - 認証プロセス中に作成された Authentication オブジェクト。
      例外:
      IOExceptionSE
      jakarta.servlet.ServletException