クラス SecurityMockServerConfigurers.JwtMutator

  • 実装されたすべてのインターフェース:
    org.springframework.test.web.reactive.server.MockServerConfigurerorg.springframework.test.web.reactive.server.WebTestClientConfigurer
    含まれているクラス:
    SecurityMockServerConfigurers

    public static final class SecurityMockServerConfigurers.JwtMutator
    extends java.lang.Object
    implements org.springframework.test.web.reactive.server.WebTestClientConfigurer, org.springframework.test.web.reactive.server.MockServerConfigurer
    {@link SecurityMockServerConfigurers#mockAuthentication(Authentication)} を使用して WebServerExchange を更新します。
    導入:
    5.2
    • メソッドの詳細

      • jwt

        public SecurityMockServerConfigurers.JwtMutator jwt​(java.util.function.Consumer<Jwt.Builder> jwtBuilderConsumer)
        指定された Jwt.Builder Consumer を使用して、基になる Jwt を構成します。このメソッドは、最初に、algsubscope クレームのデフォルト値を持つデフォルトの Jwt.Builder インスタンスを作成します。Consumer は、これらを変更したり、追加の構成を提供したりできます。SecurityMockServerConfigurers.mockJwt() を呼び出すことは、SecurityMockMvcRequestPostProcessors.mockJwt().jwt(() -> {}) を呼び出すことと同じです。
        パラメーター:
        jwtBuilderConsumer - 基礎となる Jwt を構成するため
        戻り値:
        さらなる構成のための SecurityMockServerConfigurers.JwtMutator
      • beforeServerCreated

        public void beforeServerCreated​(org.springframework.web.server.adapter.WebHttpHandlerBuilder builder)
        次で指定:
        インターフェース org.springframework.test.web.reactive.server.MockServerConfigurerbeforeServerCreated 
      • afterConfigureAdded

        public void afterConfigureAdded​(org.springframework.test.web.reactive.server.WebTestClient.MockServerSpec<?> serverSpec)
        次で指定:
        インターフェース org.springframework.test.web.reactive.server.MockServerConfigurerafterConfigureAdded 
      • afterConfigurerAdded

        public void afterConfigurerAdded​(org.springframework.test.web.reactive.server.WebTestClient.Builder builder,
                                         @Nullable
                                         org.springframework.web.server.adapter.WebHttpHandlerBuilder httpHandlerBuilder,
                                         @Nullable
                                         org.springframework.http.client.reactive.ClientHttpConnector connector)
        次で指定:
        インターフェース org.springframework.test.web.reactive.server.WebTestClientConfigurerafterConfigurerAdded