|
@@ -16,33 +16,18 @@
|
|
|
|
|
|
package org.springframework.security.docs.servlet.authentication.servletx509config;
|
|
package org.springframework.security.docs.servlet.authentication.servletx509config;
|
|
|
|
|
|
-import java.io.InputStream;
|
|
|
|
-import java.security.cert.Certificate;
|
|
|
|
-import java.security.cert.CertificateFactory;
|
|
|
|
import java.security.cert.X509Certificate;
|
|
import java.security.cert.X509Certificate;
|
|
|
|
|
|
-import org.jetbrains.annotations.NotNull;
|
|
|
|
-import org.jspecify.annotations.Nullable;
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
import org.junit.jupiter.api.Test;
|
|
import org.junit.jupiter.api.extension.ExtendWith;
|
|
import org.junit.jupiter.api.extension.ExtendWith;
|
|
-import reactor.core.publisher.Mono;
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
-import org.springframework.core.io.ClassPathResource;
|
|
|
|
-import org.springframework.http.client.reactive.ClientHttpConnector;
|
|
|
|
-import org.springframework.http.server.reactive.ServerHttpRequest;
|
|
|
|
import org.springframework.security.config.test.SpringTestContext;
|
|
import org.springframework.security.config.test.SpringTestContext;
|
|
import org.springframework.security.config.test.SpringTestContextExtension;
|
|
import org.springframework.security.config.test.SpringTestContextExtension;
|
|
import org.springframework.security.web.authentication.preauth.x509.X509TestUtils;
|
|
import org.springframework.security.web.authentication.preauth.x509.X509TestUtils;
|
|
-import org.springframework.test.web.reactive.server.WebTestClient;
|
|
|
|
-import org.springframework.test.web.reactive.server.WebTestClientConfigurer;
|
|
|
|
import org.springframework.test.web.servlet.MockMvc;
|
|
import org.springframework.test.web.servlet.MockMvc;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
-import org.springframework.web.server.ServerWebExchange;
|
|
|
|
-import org.springframework.web.server.WebFilter;
|
|
|
|
-import org.springframework.web.server.WebFilterChain;
|
|
|
|
-import org.springframework.web.server.adapter.WebHttpHandlerBuilder;
|
|
|
|
|
|
|
|
import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.x509;
|
|
import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.x509;
|
|
import static org.springframework.security.test.web.servlet.response.SecurityMockMvcResultMatchers.authenticated;
|
|
import static org.springframework.security.test.web.servlet.response.SecurityMockMvcResultMatchers.authenticated;
|