クラス CsrfAuthenticationStrategy
- java.lang.Object
-
- org.springframework.security.web.csrf.CsrfAuthenticationStrategy
- 実装されたすべてのインターフェース:
SessionAuthenticationStrategy
public final class CsrfAuthenticationStrategy extends java.lang.Object implements SessionAuthenticationStrategy
CsrfAuthenticationStrategy
は、認証時にCsrfToken
を削除するロールを果たします。新しいCsrfToken
は、次のリクエスト時にフレームワークによって生成されます。- 導入:
- 3.2
コンストラクターのサマリー
コンストラクター コンストラクター 説明 CsrfAuthenticationStrategy(CsrfTokenRepository csrfTokenRepository)
新しいインスタンスを作成します
メソッドのサマリー
すべてのメソッド インスタンスメソッド 具象メソッド 修飾子と型 メソッド 説明 void
onAuthentication(Authentication authentication, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
新しい認証が発生したときに Http セッション関連の機能を実行します。
コンストラクターの詳細
CsrfAuthenticationStrategy
public CsrfAuthenticationStrategy(CsrfTokenRepository csrfTokenRepository)
新しいインスタンスを作成します- パラメーター:
csrfTokenRepository
- 使用するCsrfTokenRepository
メソッドの詳細
onAuthentication
public void onAuthentication(Authentication authentication, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws SessionAuthenticationException
インターフェースからコピーされた説明:SessionAuthenticationStrategy
新しい認証が発生したときに Http セッション関連の機能を実行します。- 次で指定:
- インターフェース
SessionAuthenticationStrategy
のonAuthentication
- 例外:
SessionAuthenticationException
- セッションで認証が許可されていないと判断された場合。これは通常、ユーザーが一度に開いているセッションが多すぎるためです。