Joe Grandja 3 жил өмнө
parent
commit
33a78913fa
18 өөрчлөгдсөн 35 нэмэгдсэн , 112 устгасан
  1. 1 7
      docs/src/docs/asciidoc/examples/src/test/java/sample/jose/TestKeys.java
  2. 1 6
      docs/src/docs/asciidoc/examples/src/test/java/sample/test/SpringTestContext.java
  3. 2 4
      docs/src/docs/asciidoc/examples/src/test/java/sample/test/SpringTestContextExtension.java
  4. 2 6
      oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/http/converter/HttpMessageConverters.java
  5. 2 7
      oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/jackson2/JsonNodeUtils.java
  6. 2 7
      oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/jackson2/OAuth2AuthorizationRequestDeserializer.java
  7. 2 7
      oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/jackson2/OAuth2AuthorizationRequestMixin.java
  8. 2 7
      oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/jackson2/StdConverters.java
  9. 2 7
      oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/jackson2/UnmodifiableMapDeserializer.java
  10. 2 7
      oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/jackson2/UnmodifiableMapMixin.java
  11. 0 1
      oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/oidc/authentication/OidcClientRegistrationAuthenticationProvider.java
  12. 2 6
      oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/oidc/http/converter/HttpMessageConverters.java
  13. 0 1
      oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/web/OAuth2AuthorizationEndpointFilter.java
  14. 10 15
      oauth2-authorization-server/src/test/java/org/springframework/security/config/test/SpringTestContext.java
  15. 2 7
      oauth2-authorization-server/src/test/java/org/springframework/security/config/test/SpringTestRule.java
  16. 1 5
      oauth2-authorization-server/src/test/java/org/springframework/security/config/util/InMemoryXmlApplicationContext.java
  17. 1 5
      oauth2-authorization-server/src/test/java/org/springframework/security/config/util/InMemoryXmlWebApplicationContext.java
  18. 1 7
      oauth2-authorization-server/src/test/java/org/springframework/security/oauth2/jose/TestKeys.java

+ 1 - 7
docs/src/docs/asciidoc/examples/src/test/java/sample/jose/TestKeys.java

@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright 2002-2021 the original author or authors.
+ * Copyright 2020-2022 the original author or authors.
  *
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * limitations under the License.
  */
  */
-
 package sample.jose;
 package sample.jose;
 
 
 import java.math.BigInteger;
 import java.math.BigInteger;
@@ -36,12 +35,7 @@ import javax.crypto.SecretKey;
 import javax.crypto.spec.SecretKeySpec;
 import javax.crypto.spec.SecretKeySpec;
 
 
 /**
 /**
- * TODO
- * This class is a straight copy from Spring Security.
- * It should be removed when merging this codebase into Spring Security.
- *
  * @author Joe Grandja
  * @author Joe Grandja
- * @since 5.2
  */
  */
 public final class TestKeys {
 public final class TestKeys {
 
 

+ 1 - 6
docs/src/docs/asciidoc/examples/src/test/java/sample/test/SpringTestContext.java

@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2020-2022 the original author or authors.
  *
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * limitations under the License.
  */
  */
-
 package sample.test;
 package sample.test;
 
 
 import java.io.Closeable;
 import java.io.Closeable;
@@ -44,11 +43,7 @@ import org.springframework.web.filter.OncePerRequestFilter;
 import static org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers.springSecurity;
 import static org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers.springSecurity;
 
 
 /**
 /**
- * TODO
- * This class is a straight copy from Spring Security.
- *
  * @author Rob Winch
  * @author Rob Winch
- * @since 5.0
  */
  */
 public class SpringTestContext implements Closeable {
 public class SpringTestContext implements Closeable {
 
 

+ 2 - 4
docs/src/docs/asciidoc/examples/src/test/java/sample/test/SpringTestContextExtension.java

@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2020-2022 the original author or authors.
  *
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * limitations under the License.
  */
  */
-
 package sample.test;
 package sample.test;
 
 
 import java.lang.reflect.Field;
 import java.lang.reflect.Field;
@@ -27,8 +26,7 @@ import org.junit.jupiter.api.extension.ExtensionContext;
 import org.springframework.security.test.context.TestSecurityContextHolder;
 import org.springframework.security.test.context.TestSecurityContextHolder;
 
 
 /**
 /**
- * TODO
- * This class is a straight copy from Spring Security.
+ * @author Rob Winch
  */
  */
 public class SpringTestContextExtension implements BeforeEachCallback, AfterEachCallback {
 public class SpringTestContextExtension implements BeforeEachCallback, AfterEachCallback {
 
 

+ 2 - 6
oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/http/converter/HttpMessageConverters.java

@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2020-2022 the original author or authors.
  *
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * you may not use this file except in compliance with the License.
@@ -23,14 +23,10 @@ import org.springframework.http.converter.json.MappingJackson2HttpMessageConvert
 import org.springframework.util.ClassUtils;
 import org.springframework.util.ClassUtils;
 
 
 /**
 /**
- * TODO
- * This class is a straight copy from Spring Security.
- * It should be consolidated when merging this codebase into Spring Security.
- *
  * Utility methods for {@link HttpMessageConverter}'s.
  * Utility methods for {@link HttpMessageConverter}'s.
  *
  *
  * @author Joe Grandja
  * @author Joe Grandja
- * @since 5.1
+ * @since 0.1.1
  */
  */
 final class HttpMessageConverters {
 final class HttpMessageConverters {
 
 

+ 2 - 7
oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/jackson2/JsonNodeUtils.java

@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2020-2022 the original author or authors.
  *
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * limitations under the License.
  */
  */
-
 package org.springframework.security.oauth2.server.authorization.jackson2;
 package org.springframework.security.oauth2.server.authorization.jackson2;
 
 
 import java.util.Map;
 import java.util.Map;
@@ -24,14 +23,10 @@ import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.ObjectMapper;
 
 
 /**
 /**
- * TODO
- * This class is a straight copy from Spring Security.
- * It should be consolidated when merging this codebase into Spring Security.
- *
  * Utility class for {@code JsonNode}.
  * Utility class for {@code JsonNode}.
  *
  *
  * @author Joe Grandja
  * @author Joe Grandja
- * @since 5.3
+ * @since 0.1.2
  */
  */
 abstract class JsonNodeUtils {
 abstract class JsonNodeUtils {
 
 

+ 2 - 7
oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/jackson2/OAuth2AuthorizationRequestDeserializer.java

@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2020-2022 the original author or authors.
  *
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * limitations under the License.
  */
  */
-
 package org.springframework.security.oauth2.server.authorization.jackson2;
 package org.springframework.security.oauth2.server.authorization.jackson2;
 
 
 import java.io.IOException;
 import java.io.IOException;
@@ -31,14 +30,10 @@ import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequ
 import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest.Builder;
 import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest.Builder;
 
 
 /**
 /**
- * TODO
- * This class is a straight copy from Spring Security.
- * It should be consolidated when merging this codebase into Spring Security.
- *
  * A {@code JsonDeserializer} for {@link OAuth2AuthorizationRequest}.
  * A {@code JsonDeserializer} for {@link OAuth2AuthorizationRequest}.
  *
  *
  * @author Joe Grandja
  * @author Joe Grandja
- * @since 5.3
+ * @since 0.1.2
  * @see OAuth2AuthorizationRequest
  * @see OAuth2AuthorizationRequest
  * @see OAuth2AuthorizationRequestMixin
  * @see OAuth2AuthorizationRequestMixin
  */
  */

+ 2 - 7
oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/jackson2/OAuth2AuthorizationRequestMixin.java

@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2020-2022 the original author or authors.
  *
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * limitations under the License.
  */
  */
-
 package org.springframework.security.oauth2.server.authorization.jackson2;
 package org.springframework.security.oauth2.server.authorization.jackson2;
 
 
 import com.fasterxml.jackson.annotation.JsonAutoDetect;
 import com.fasterxml.jackson.annotation.JsonAutoDetect;
@@ -24,15 +23,11 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
 import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest;
 import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest;
 
 
 /**
 /**
- * TODO
- * This class is a straight copy from Spring Security.
- * It should be consolidated when merging this codebase into Spring Security.
- *
  * This mixin class is used to serialize/deserialize {@link OAuth2AuthorizationRequest}.
  * This mixin class is used to serialize/deserialize {@link OAuth2AuthorizationRequest}.
  * It also registers a custom deserializer {@link OAuth2AuthorizationRequestDeserializer}.
  * It also registers a custom deserializer {@link OAuth2AuthorizationRequestDeserializer}.
  *
  *
  * @author Joe Grandja
  * @author Joe Grandja
- * @since 5.3
+ * @since 0.1.2
  * @see OAuth2AuthorizationRequest
  * @see OAuth2AuthorizationRequest
  * @see OAuth2AuthorizationRequestDeserializer
  * @see OAuth2AuthorizationRequestDeserializer
  */
  */

+ 2 - 7
oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/jackson2/StdConverters.java

@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2020-2022 the original author or authors.
  *
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * limitations under the License.
  */
  */
-
 package org.springframework.security.oauth2.server.authorization.jackson2;
 package org.springframework.security.oauth2.server.authorization.jackson2;
 
 
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.JsonNode;
@@ -25,14 +24,10 @@ import org.springframework.security.oauth2.core.ClientAuthenticationMethod;
 import org.springframework.security.oauth2.core.OAuth2AccessToken;
 import org.springframework.security.oauth2.core.OAuth2AccessToken;
 
 
 /**
 /**
- * TODO
- * This class is a straight copy from Spring Security.
- * It should be consolidated when merging this codebase into Spring Security.
- *
  * {@code StdConverter} implementations.
  * {@code StdConverter} implementations.
  *
  *
  * @author Joe Grandja
  * @author Joe Grandja
- * @since 5.3
+ * @since 0.1.2
  */
  */
 abstract class StdConverters {
 abstract class StdConverters {
 
 

+ 2 - 7
oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/jackson2/UnmodifiableMapDeserializer.java

@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2020-2022 the original author or authors.
  *
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * limitations under the License.
  */
  */
-
 package org.springframework.security.oauth2.server.authorization.jackson2;
 package org.springframework.security.oauth2.server.authorization.jackson2;
 
 
 import java.io.IOException;
 import java.io.IOException;
@@ -28,14 +27,10 @@ import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.ObjectMapper;
 
 
 /**
 /**
- * TODO
- * This class is a straight copy from Spring Security.
- * It should be consolidated when merging this codebase into Spring Security.
- *
  * A {@code JsonDeserializer} for {@link Collections#unmodifiableMap(Map)}.
  * A {@code JsonDeserializer} for {@link Collections#unmodifiableMap(Map)}.
  *
  *
  * @author Joe Grandja
  * @author Joe Grandja
- * @since 5.3
+ * @since 0.1.2
  * @see Collections#unmodifiableMap(Map)
  * @see Collections#unmodifiableMap(Map)
  * @see UnmodifiableMapMixin
  * @see UnmodifiableMapMixin
  */
  */

+ 2 - 7
oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/jackson2/UnmodifiableMapMixin.java

@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2020-2022 the original author or authors.
  *
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * limitations under the License.
  */
  */
-
 package org.springframework.security.oauth2.server.authorization.jackson2;
 package org.springframework.security.oauth2.server.authorization.jackson2;
 
 
 import java.util.Collections;
 import java.util.Collections;
@@ -24,16 +23,12 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo;
 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
 
 
 /**
 /**
- * TODO
- * This class is a straight copy from Spring Security.
- * It should be consolidated when merging this codebase into Spring Security.
- *
  * This mixin class is used to serialize/deserialize
  * This mixin class is used to serialize/deserialize
  * {@link Collections#unmodifiableMap(Map)}. It also registers a custom deserializer
  * {@link Collections#unmodifiableMap(Map)}. It also registers a custom deserializer
  * {@link UnmodifiableMapDeserializer}.
  * {@link UnmodifiableMapDeserializer}.
  *
  *
  * @author Joe Grandja
  * @author Joe Grandja
- * @since 5.3
+ * @since 0.1.2
  * @see Collections#unmodifiableMap(Map)
  * @see Collections#unmodifiableMap(Map)
  * @see UnmodifiableMapDeserializer
  * @see UnmodifiableMapDeserializer
  */
  */

+ 0 - 1
oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/oidc/authentication/OidcClientRegistrationAuthenticationProvider.java

@@ -177,7 +177,6 @@ public final class OidcClientRegistrationAuthenticationProvider implements Authe
 		}
 		}
 
 
 		if (!isValidTokenEndpointAuthenticationMethod(clientRegistrationAuthentication.getClientRegistration())) {
 		if (!isValidTokenEndpointAuthenticationMethod(clientRegistrationAuthentication.getClientRegistration())) {
-			// TODO Add OAuth2ErrorCodes.INVALID_CLIENT_METADATA
 			throwInvalidClientRegistration("invalid_client_metadata", OidcClientMetadataClaimNames.TOKEN_ENDPOINT_AUTH_METHOD);
 			throwInvalidClientRegistration("invalid_client_metadata", OidcClientMetadataClaimNames.TOKEN_ENDPOINT_AUTH_METHOD);
 		}
 		}
 
 

+ 2 - 6
oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/oidc/http/converter/HttpMessageConverters.java

@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2020-2022 the original author or authors.
  *
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * you may not use this file except in compliance with the License.
@@ -23,14 +23,10 @@ import org.springframework.http.converter.json.MappingJackson2HttpMessageConvert
 import org.springframework.util.ClassUtils;
 import org.springframework.util.ClassUtils;
 
 
 /**
 /**
- * TODO
- * This class is a straight copy from Spring Security.
- * It should be consolidated when merging this codebase into Spring Security.
- *
  * Utility methods for {@link HttpMessageConverter}'s.
  * Utility methods for {@link HttpMessageConverter}'s.
  *
  *
  * @author Joe Grandja
  * @author Joe Grandja
- * @since 5.1
+ * @since 0.1.0
  */
  */
 final class HttpMessageConverters {
 final class HttpMessageConverters {
 
 

+ 0 - 1
oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/web/OAuth2AuthorizationEndpointFilter.java

@@ -291,7 +291,6 @@ public final class OAuth2AuthorizationEndpointFilter extends OncePerRequestFilte
 
 
 		if (authorizationCodeRequestAuthentication == null ||
 		if (authorizationCodeRequestAuthentication == null ||
 				!StringUtils.hasText(authorizationCodeRequestAuthentication.getRedirectUri())) {
 				!StringUtils.hasText(authorizationCodeRequestAuthentication.getRedirectUri())) {
-			// TODO Send default html error response
 			response.sendError(HttpStatus.BAD_REQUEST.value(), error.toString());
 			response.sendError(HttpStatus.BAD_REQUEST.value(), error.toString());
 			return;
 			return;
 		}
 		}

+ 10 - 15
oauth2-authorization-server/src/test/java/org/springframework/security/config/test/SpringTestContext.java

@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2020-2022 the original author or authors.
  *
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * you may not use this file except in compliance with the License.
@@ -13,9 +13,17 @@
  * See the License for the specific language governing permissions and
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * limitations under the License.
  */
  */
-
 package org.springframework.security.config.test;
 package org.springframework.security.config.test;
 
 
+import java.io.Closeable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
 import org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor;
 import org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor;
 import org.springframework.mock.web.MockServletConfig;
 import org.springframework.mock.web.MockServletConfig;
 import org.springframework.mock.web.MockServletContext;
 import org.springframework.mock.web.MockServletContext;
@@ -32,24 +40,11 @@ import org.springframework.web.context.support.AnnotationConfigWebApplicationCon
 import org.springframework.web.context.support.XmlWebApplicationContext;
 import org.springframework.web.context.support.XmlWebApplicationContext;
 import org.springframework.web.filter.OncePerRequestFilter;
 import org.springframework.web.filter.OncePerRequestFilter;
 
 
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.Closeable;
-import java.util.ArrayList;
-import java.util.List;
-
 import static org.springframework.security.config.BeanIds.SPRING_SECURITY_FILTER_CHAIN;
 import static org.springframework.security.config.BeanIds.SPRING_SECURITY_FILTER_CHAIN;
 import static org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers.springSecurity;
 import static org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers.springSecurity;
 
 
 /**
 /**
- * TODO
- * This class is a straight copy from Spring Security.
- * It should be removed when merging this codebase into Spring Security.
- *
  * @author Rob Winch
  * @author Rob Winch
- * @since 5.0
  */
  */
 public class SpringTestContext implements Closeable {
 public class SpringTestContext implements Closeable {
 	private Object test;
 	private Object test;

+ 2 - 7
oauth2-authorization-server/src/test/java/org/springframework/security/config/test/SpringTestRule.java

@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2020-2022 the original author or authors.
  *
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * you may not use this file except in compliance with the License.
@@ -13,21 +13,16 @@
  * See the License for the specific language governing permissions and
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * limitations under the License.
  */
  */
-
 package org.springframework.security.config.test;
 package org.springframework.security.config.test;
 
 
 import org.junit.rules.MethodRule;
 import org.junit.rules.MethodRule;
 import org.junit.runners.model.FrameworkMethod;
 import org.junit.runners.model.FrameworkMethod;
 import org.junit.runners.model.Statement;
 import org.junit.runners.model.Statement;
+
 import org.springframework.security.test.context.TestSecurityContextHolder;
 import org.springframework.security.test.context.TestSecurityContextHolder;
 
 
 /**
 /**
- * TODO
- * This class is a straight copy from Spring Security.
- * It should be removed when merging this codebase into Spring Security.
- *
  * @author Rob Winch
  * @author Rob Winch
- * @since 5.0
  */
  */
 public class SpringTestRule extends SpringTestContext implements MethodRule {
 public class SpringTestRule extends SpringTestContext implements MethodRule {
 	@Override
 	@Override

+ 1 - 5
oauth2-authorization-server/src/test/java/org/springframework/security/config/util/InMemoryXmlApplicationContext.java

@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright 2009-2020 the original author or authors.
+ * Copyright 2020-2022 the original author or authors.
  *
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * you may not use this file except in compliance with the License.
@@ -22,10 +22,6 @@ import org.springframework.core.io.Resource;
 import org.springframework.security.util.InMemoryResource;
 import org.springframework.security.util.InMemoryResource;
 
 
 /**
 /**
- * TODO
- * This class is a straight copy from Spring Security.
- * It should be removed when merging this codebase into Spring Security.
- *
  * @author Luke Taylor
  * @author Luke Taylor
  * @author Eddú Meléndez
  * @author Eddú Meléndez
  */
  */

+ 1 - 5
oauth2-authorization-server/src/test/java/org/springframework/security/config/util/InMemoryXmlWebApplicationContext.java

@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright 2012-2016 the original author or authors.
+ * Copyright 2020-2022 the original author or authors.
  *
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * you may not use this file except in compliance with the License.
@@ -28,10 +28,6 @@ import static org.springframework.security.config.util.InMemoryXmlApplicationCon
 import static org.springframework.security.config.util.InMemoryXmlApplicationContext.SPRING_SECURITY_VERSION;
 import static org.springframework.security.config.util.InMemoryXmlApplicationContext.SPRING_SECURITY_VERSION;
 
 
 /**
 /**
- * TODO
- * This class is a straight copy from Spring Security.
- * It should be removed when merging this codebase into Spring Security.
- *
  * @author Joe Grandja
  * @author Joe Grandja
  */
  */
 public class InMemoryXmlWebApplicationContext extends AbstractRefreshableWebApplicationContext {
 public class InMemoryXmlWebApplicationContext extends AbstractRefreshableWebApplicationContext {

+ 1 - 7
oauth2-authorization-server/src/test/java/org/springframework/security/oauth2/jose/TestKeys.java

@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright 2002-2021 the original author or authors.
+ * Copyright 2020-2022 the original author or authors.
  *
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * limitations under the License.
  */
  */
-
 package org.springframework.security.oauth2.jose;
 package org.springframework.security.oauth2.jose;
 
 
 import java.math.BigInteger;
 import java.math.BigInteger;
@@ -36,12 +35,7 @@ import javax.crypto.SecretKey;
 import javax.crypto.spec.SecretKeySpec;
 import javax.crypto.spec.SecretKeySpec;
 
 
 /**
 /**
- * TODO
- * This class is a straight copy from Spring Security.
- * It should be removed when merging this codebase into Spring Security.
- *
  * @author Joe Grandja
  * @author Joe Grandja
- * @since 5.2
  */
  */
 public final class TestKeys {
 public final class TestKeys {