クラス AuthenticationWebFilter

    • コンストラクターの詳細

      • AuthenticationWebFilter

        public AuthenticationWebFilter​(ReactiveAuthenticationManager authenticationManager)
        インスタンスを作成します
        パラメーター:
        authenticationManager - 使用する認証マネージャー
      • AuthenticationWebFilter

        public AuthenticationWebFilter​(ReactiveAuthenticationManagerResolver<org.springframework.web.server.ServerWebExchange> authenticationManagerResolver)
        インスタンスを作成します
        パラメーター:
        authenticationManagerResolver - 使用する認証マネージャーリゾルバー
        導入:
        5.3
    • メソッドの詳細

      • filter

        public reactor.core.publisher.Mono<java.lang.Void> filter​(org.springframework.web.server.ServerWebExchange exchange,
                                                                  org.springframework.web.server.WebFilterChain chain)
        次で指定:
        インターフェース org.springframework.web.server.WebFilterfilter 
      • onAuthenticationSuccess

        protected reactor.core.publisher.Mono<java.lang.Void> onAuthenticationSuccess​(Authentication authentication,
                                                                                      WebFilterExchange webFilterExchange)
      • setSecurityContextRepository

        public void setSecurityContextRepository​(ServerSecurityContextRepository securityContextRepository)
        SecurityContext を永続化するためのリポジトリを設定します。デフォルトは NoOpServerSecurityContextRepository です
        パラメーター:
        securityContextRepository - 使用するリポジトリ
      • setServerAuthenticationConverter

        public void setServerAuthenticationConverter​(ServerAuthenticationConverter authenticationConverter)
        ServerWebExchange から、提供された ReactiveAuthenticationManager での認証に使用される Authentication に変換するために使用される戦略を設定します。結果が空の場合、認証の試行を行わないことを通知します。デフォルトのコンバーターは ServerHttpBasicAuthenticationConverter です
        パラメーター:
        authenticationConverter - 使用するコンバーター
        導入:
        5.1
      • setAuthenticationFailureHandler

        public void setAuthenticationFailureHandler​(ServerAuthenticationFailureHandler authenticationFailureHandler)
        認証が失敗したときに使用される失敗ハンドラーを設定します。デフォルトでは、基本認証のプロンプトが表示されます。
        パラメーター:
        authenticationFailureHandler - 使用するハンドラー。null にはできません。
      • setRequiresAuthenticationMatcher

        public void setRequiresAuthenticationMatcher​(ServerWebExchangeMatcher requiresAuthenticationMatcher)
        認証する setServerAuthenticationConverter(ServerAuthenticationConverter) から Authentication を作成するときに決定するために使用されるマッチャーを設定します。コンバーターが空の結果を返す場合、認証は試行されません。デフォルトはすべてのリクエストです
        パラメーター:
        requiresAuthenticationMatcher - 使用するマッチャー。null にはできません。