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