クラス 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)新しいインスタンスを作成します
方法の概要
すべてのメソッド インスタンスメソッド 具象メソッド 修飾子と型 メソッド 説明 voidonAuthentication(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- セッションで認証が許可されていないと判断された場合。これは通常、ユーザーが一度に開いているセッションが多すぎるためです。