浏览代码

Fix jwt package tangles

JWT is part of OAuth2, so it should be a subpackage of oauth2.

Fixes gh-4614
Rob Winch 7 年之前
父节点
当前提交
b764c666c6

+ 2 - 2
oauth2/jwt-jose/src/main/java/org/springframework/security/jose/jws/JwsAlgorithm.java → oauth2/jwt-jose/src/main/java/org/springframework/security/oauth2/jose/jws/JwsAlgorithm.java

@@ -1,5 +1,5 @@
 /*
- * Copyright 2012-2017 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.springframework.security.jose.jws;
+package org.springframework.security.oauth2.jose.jws;
 
 /**
  * The cryptographic algorithms defined by the <i>JSON Web Algorithms (JWA)</i> specification

+ 2 - 2
oauth2/jwt-jose/src/main/java/org/springframework/security/jwt/Jwt.java → oauth2/jwt-jose/src/main/java/org/springframework/security/oauth2/jwt/Jwt.java

@@ -1,5 +1,5 @@
 /*
- * Copyright 2012-2017 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.springframework.security.jwt;
+package org.springframework.security.oauth2.jwt;
 
 import org.springframework.security.oauth2.core.SecurityToken;
 import org.springframework.util.Assert;

+ 2 - 2
oauth2/jwt-jose/src/main/java/org/springframework/security/jwt/JwtClaim.java → oauth2/jwt-jose/src/main/java/org/springframework/security/oauth2/jwt/JwtClaim.java

@@ -1,5 +1,5 @@
 /*
- * Copyright 2012-2017 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.springframework.security.jwt;
+package org.springframework.security.oauth2.jwt;
 
 /**
  * The &quot;Registered Claim Names&quot; defined by the <i>JSON Web Token (JWT)</i> specification

+ 2 - 2
oauth2/jwt-jose/src/main/java/org/springframework/security/jwt/JwtClaimAccessor.java → oauth2/jwt-jose/src/main/java/org/springframework/security/oauth2/jwt/JwtClaimAccessor.java

@@ -1,5 +1,5 @@
 /*
- * Copyright 2012-2017 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.springframework.security.jwt;
+package org.springframework.security.oauth2.jwt;
 
 import org.springframework.security.oauth2.core.ClaimAccessor;
 

+ 2 - 2
oauth2/jwt-jose/src/main/java/org/springframework/security/jwt/JwtDecoder.java → oauth2/jwt-jose/src/main/java/org/springframework/security/oauth2/jwt/JwtDecoder.java

@@ -1,5 +1,5 @@
 /*
- * Copyright 2012-2017 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.springframework.security.jwt;
+package org.springframework.security.oauth2.jwt;
 
 /**
  * Implementations of this interface are responsible for &quot;decoding&quot;

+ 2 - 2
oauth2/jwt-jose/src/main/java/org/springframework/security/jwt/JwtException.java → oauth2/jwt-jose/src/main/java/org/springframework/security/oauth2/jwt/JwtException.java

@@ -1,5 +1,5 @@
 /*
- * Copyright 2012-2017 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.springframework.security.jwt;
+package org.springframework.security.oauth2.jwt;
 
 /**
  * Base exception for all <i>JSON Web Token (JWT)</i> related errors.

+ 3 - 3
oauth2/jwt-jose/src/main/java/org/springframework/security/jwt/NimbusJwtDecoderJwkSupport.java → oauth2/jwt-jose/src/main/java/org/springframework/security/oauth2/jwt/NimbusJwtDecoderJwkSupport.java

@@ -1,5 +1,5 @@
 /*
- * Copyright 2012-2017 the original author or authors.
+ * Copyright 2002-2017 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.springframework.security.jwt;
+package org.springframework.security.oauth2.jwt;
 
 import com.nimbusds.jose.JWSAlgorithm;
 import com.nimbusds.jose.jwk.source.JWKSource;
@@ -28,7 +28,7 @@ import com.nimbusds.jwt.JWTClaimsSet;
 import com.nimbusds.jwt.JWTParser;
 import com.nimbusds.jwt.proc.ConfigurableJWTProcessor;
 import com.nimbusds.jwt.proc.DefaultJWTProcessor;
-import org.springframework.security.jose.jws.JwsAlgorithm;
+import org.springframework.security.oauth2.jose.jws.JwsAlgorithm;
 import org.springframework.util.Assert;
 
 import java.net.MalformedURLException;

+ 1 - 1
oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/authentication/jwt/JwtDecoderRegistry.java

@@ -15,7 +15,7 @@
  */
 package org.springframework.security.oauth2.client.authentication.jwt;
 
-import org.springframework.security.jwt.JwtDecoder;
+import org.springframework.security.oauth2.jwt.JwtDecoder;
 import org.springframework.security.oauth2.client.registration.ClientRegistration;
 
 /**

+ 2 - 2
oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/authentication/jwt/NimbusJwtDecoderRegistry.java

@@ -15,8 +15,8 @@
  */
 package org.springframework.security.oauth2.client.authentication.jwt;
 
-import org.springframework.security.jwt.JwtDecoder;
-import org.springframework.security.jwt.NimbusJwtDecoderJwkSupport;
+import org.springframework.security.oauth2.jwt.JwtDecoder;
+import org.springframework.security.oauth2.jwt.NimbusJwtDecoderJwkSupport;
 import org.springframework.security.oauth2.client.registration.ClientRegistration;
 import org.springframework.util.Assert;
 import org.springframework.util.StringUtils;

+ 2 - 2
oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/oidc/client/authentication/OidcAuthorizationCodeAuthenticationProvider.java

@@ -18,8 +18,8 @@ package org.springframework.security.oauth2.oidc.client.authentication;
 import org.springframework.security.authentication.AuthenticationProvider;
 import org.springframework.security.core.Authentication;
 import org.springframework.security.core.AuthenticationException;
-import org.springframework.security.jwt.Jwt;
-import org.springframework.security.jwt.JwtDecoder;
+import org.springframework.security.oauth2.jwt.Jwt;
+import org.springframework.security.oauth2.jwt.JwtDecoder;
 import org.springframework.security.oauth2.client.authentication.AuthorizationCodeAuthenticationToken;
 import org.springframework.security.oauth2.client.authentication.AuthorizationGrantTokenExchanger;
 import org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationException;