クラス WebSessionServerSecurityContextRepository

java.lang.ObjectSE
org.springframework.security.web.server.context.WebSessionServerSecurityContextRepository
実装されたすべてのインターフェース:
ServerSecurityContextRepository

public class WebSessionServerSecurityContextRepository extends ObjectSE implements ServerSecurityContextRepository
SecurityContext を WebSession に格納します。SecurityContext が保存されると、セッション固定攻撃を防ぐためにセッション ID が変更されます。
導入:
5.0
  • フィールドの詳細

    • DEFAULT_SPRING_SECURITY_CONTEXT_ATTR_NAME

      public static final StringSE DEFAULT_SPRING_SECURITY_CONTEXT_ATTR_NAME
      SecurityContext を保存およびロードするためのデフォルトのセッション属性名
      関連事項:
  • コンストラクターの詳細

    • WebSessionServerSecurityContextRepository

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

    • setSpringSecurityContextAttrName

      public void setSpringSecurityContextAttrName(StringSE springSecurityContextAttrName)
      SecurityContext の保存とロードに使用されるセッション属性名を設定します
      パラメーター:
      springSecurityContextAttrName - SecurityContext の保存およびロードに使用するセッション属性名
    • setCacheSecurityContext

      public void setCacheSecurityContext(boolean cacheSecurityContext)
      true に設定すると、load(ServerWebExchange) の結果は Mono.cache() を使用して複数のルックアップを防ぎます。
      パラメーター:
      cacheSecurityContext - Mono.cache() を使用する必要がある場合は true、それ以外の場合は false。
    • save

      public reactor.core.publisher.Mono<VoidSE> save(org.springframework.web.server.ServerWebExchange exchange, SecurityContext context)
      インターフェースからコピーされた説明: ServerSecurityContextRepository
      SecurityContext を保存します
      次で指定:
      インターフェース ServerSecurityContextRepositorysave 
      パラメーター:
      exchange - SecurityContext に関連付ける交換
      context - 保存する SecurityContext
      戻り値:
      完了通知 (成功またはエラー)
    • load

      public reactor.core.publisher.Mono<SecurityContext> load(org.springframework.web.server.ServerWebExchange exchange)
      インターフェースからコピーされた説明: ServerSecurityContextRepository
      ServerWebExchange に関連付けられた SecurityContext をロードします
      次で指定:
      インターフェース ServerSecurityContextRepositoryload 
      パラメーター:
      exchange - SecurityContext を検索する交換
      戻り値:
      検索する SecurityContext。見つからない場合は空。null しない