Rename and move SpringSecurityCoreVersion2 to Version

Closes gh-116
This commit is contained in:
Walid EL ALAOUY 2020-09-19 13:46:14 +01:00 committed by Joe Grandja
parent 45283b42b4
commit 84cdf82c0d
11 changed files with 24 additions and 24 deletions

View File

@ -16,7 +16,7 @@
package org.springframework.security.crypto.keys; package org.springframework.security.crypto.keys;
import org.springframework.lang.Nullable; import org.springframework.lang.Nullable;
import org.springframework.security.core.SpringSecurityCoreVersion2; import org.springframework.security.oauth2.server.authorization.Version;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import javax.crypto.SecretKey; import javax.crypto.SecretKey;
@ -35,7 +35,7 @@ import java.util.Objects;
* @see KeyManager * @see KeyManager
*/ */
public final class ManagedKey implements Serializable { public final class ManagedKey implements Serializable {
private static final long serialVersionUID = SpringSecurityCoreVersion2.SERIAL_VERSION_UID; private static final long serialVersionUID = Version.SERIAL_VERSION_UID;
private Key key; private Key key;
private PublicKey publicKey; private PublicKey publicKey;
private String keyId; private String keyId;

View File

@ -16,7 +16,7 @@
package org.springframework.security.oauth2.server.authorization; package org.springframework.security.oauth2.server.authorization;
import org.springframework.lang.Nullable; import org.springframework.lang.Nullable;
import org.springframework.security.core.SpringSecurityCoreVersion2; import org.springframework.security.oauth2.server.authorization.Version;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import java.io.Serializable; import java.io.Serializable;
@ -73,7 +73,7 @@ public final class InMemoryOAuth2AuthorizationService implements OAuth2Authoriza
} }
private static class OAuth2AuthorizationId implements Serializable { private static class OAuth2AuthorizationId implements Serializable {
private static final long serialVersionUID = SpringSecurityCoreVersion2.SERIAL_VERSION_UID; private static final long serialVersionUID = Version.SERIAL_VERSION_UID;
private final String registeredClientId; private final String registeredClientId;
private final String principalName; private final String principalName;

View File

@ -15,7 +15,7 @@
*/ */
package org.springframework.security.oauth2.server.authorization; package org.springframework.security.oauth2.server.authorization;
import org.springframework.security.core.SpringSecurityCoreVersion2; import org.springframework.security.oauth2.server.authorization.Version;
import org.springframework.security.oauth2.core.OAuth2AccessToken; import org.springframework.security.oauth2.core.OAuth2AccessToken;
import org.springframework.security.oauth2.server.authorization.client.RegisteredClient; import org.springframework.security.oauth2.server.authorization.client.RegisteredClient;
import org.springframework.util.Assert; import org.springframework.util.Assert;
@ -39,7 +39,7 @@ import java.util.function.Consumer;
* @see OAuth2AccessToken * @see OAuth2AccessToken
*/ */
public class OAuth2Authorization implements Serializable { public class OAuth2Authorization implements Serializable {
private static final long serialVersionUID = SpringSecurityCoreVersion2.SERIAL_VERSION_UID; private static final long serialVersionUID = Version.SERIAL_VERSION_UID;
private String registeredClientId; private String registeredClientId;
private String principalName; private String principalName;
private OAuth2AccessToken accessToken; private OAuth2AccessToken accessToken;
@ -146,7 +146,7 @@ public class OAuth2Authorization implements Serializable {
* A builder for {@link OAuth2Authorization}. * A builder for {@link OAuth2Authorization}.
*/ */
public static class Builder implements Serializable { public static class Builder implements Serializable {
private static final long serialVersionUID = SpringSecurityCoreVersion2.SERIAL_VERSION_UID; private static final long serialVersionUID = Version.SERIAL_VERSION_UID;
private String registeredClientId; private String registeredClientId;
private String principalName; private String principalName;
private OAuth2AccessToken accessToken; private OAuth2AccessToken accessToken;

View File

@ -15,7 +15,7 @@
*/ */
package org.springframework.security.oauth2.server.authorization; package org.springframework.security.oauth2.server.authorization;
import org.springframework.security.core.SpringSecurityCoreVersion2; import org.springframework.security.oauth2.server.authorization.Version;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import java.io.Serializable; import java.io.Serializable;
@ -24,7 +24,7 @@ import java.io.Serializable;
* @author Joe Grandja * @author Joe Grandja
*/ */
public final class TokenType implements Serializable { public final class TokenType implements Serializable {
private static final long serialVersionUID = SpringSecurityCoreVersion2.SERIAL_VERSION_UID; private static final long serialVersionUID = Version.SERIAL_VERSION_UID;
public static final TokenType ACCESS_TOKEN = new TokenType("access_token"); public static final TokenType ACCESS_TOKEN = new TokenType("access_token");
public static final TokenType AUTHORIZATION_CODE = new TokenType("authorization_code"); public static final TokenType AUTHORIZATION_CODE = new TokenType("authorization_code");
private final String value; private final String value;

View File

@ -13,7 +13,7 @@
* 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.core; package org.springframework.security.oauth2.server.authorization;
/** /**
* Internal class used for serialization across Spring Security Authorization Server classes. * Internal class used for serialization across Spring Security Authorization Server classes.
@ -21,7 +21,7 @@ package org.springframework.security.core;
* @author Anoop Garlapati * @author Anoop Garlapati
* @since 0.0.1 * @since 0.0.1
*/ */
public final class SpringSecurityCoreVersion2 { public final class Version {
private static final int MAJOR = 0; private static final int MAJOR = 0;
private static final int MINOR = 0; private static final int MINOR = 0;
private static final int PATCH = 2; private static final int PATCH = 2;

View File

@ -17,7 +17,7 @@ package org.springframework.security.oauth2.server.authorization.authentication;
import org.springframework.security.authentication.AbstractAuthenticationToken; import org.springframework.security.authentication.AbstractAuthenticationToken;
import org.springframework.security.core.Authentication; import org.springframework.security.core.Authentication;
import org.springframework.security.core.SpringSecurityCoreVersion2; import org.springframework.security.oauth2.server.authorization.Version;
import org.springframework.security.oauth2.core.OAuth2AccessToken; import org.springframework.security.oauth2.core.OAuth2AccessToken;
import org.springframework.security.oauth2.server.authorization.client.RegisteredClient; import org.springframework.security.oauth2.server.authorization.client.RegisteredClient;
import org.springframework.util.Assert; import org.springframework.util.Assert;
@ -37,7 +37,7 @@ import java.util.Collections;
* @see OAuth2ClientAuthenticationToken * @see OAuth2ClientAuthenticationToken
*/ */
public class OAuth2AccessTokenAuthenticationToken extends AbstractAuthenticationToken { public class OAuth2AccessTokenAuthenticationToken extends AbstractAuthenticationToken {
private static final long serialVersionUID = SpringSecurityCoreVersion2.SERIAL_VERSION_UID; private static final long serialVersionUID = Version.SERIAL_VERSION_UID;
private final RegisteredClient registeredClient; private final RegisteredClient registeredClient;
private final Authentication clientPrincipal; private final Authentication clientPrincipal;
private final OAuth2AccessToken accessToken; private final OAuth2AccessToken accessToken;

View File

@ -18,7 +18,7 @@ package org.springframework.security.oauth2.server.authorization.authentication;
import org.springframework.lang.Nullable; import org.springframework.lang.Nullable;
import org.springframework.security.authentication.AbstractAuthenticationToken; import org.springframework.security.authentication.AbstractAuthenticationToken;
import org.springframework.security.core.Authentication; import org.springframework.security.core.Authentication;
import org.springframework.security.core.SpringSecurityCoreVersion2; import org.springframework.security.oauth2.server.authorization.Version;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import java.util.Collections; import java.util.Collections;
@ -36,7 +36,7 @@ import java.util.Map;
* @see OAuth2ClientAuthenticationToken * @see OAuth2ClientAuthenticationToken
*/ */
public class OAuth2AuthorizationCodeAuthenticationToken extends AbstractAuthenticationToken { public class OAuth2AuthorizationCodeAuthenticationToken extends AbstractAuthenticationToken {
private static final long serialVersionUID = SpringSecurityCoreVersion2.SERIAL_VERSION_UID; private static final long serialVersionUID = Version.SERIAL_VERSION_UID;
private final String code; private final String code;
private final Authentication clientPrincipal; private final Authentication clientPrincipal;
private final String redirectUri; private final String redirectUri;

View File

@ -18,7 +18,7 @@ package org.springframework.security.oauth2.server.authorization.authentication;
import org.springframework.lang.Nullable; import org.springframework.lang.Nullable;
import org.springframework.security.authentication.AbstractAuthenticationToken; import org.springframework.security.authentication.AbstractAuthenticationToken;
import org.springframework.security.core.Authentication; import org.springframework.security.core.Authentication;
import org.springframework.security.core.SpringSecurityCoreVersion2; import org.springframework.security.oauth2.server.authorization.Version;
import org.springframework.security.oauth2.server.authorization.client.RegisteredClient; import org.springframework.security.oauth2.server.authorization.client.RegisteredClient;
import org.springframework.util.Assert; import org.springframework.util.Assert;
@ -36,7 +36,7 @@ import java.util.Map;
* @see OAuth2ClientAuthenticationProvider * @see OAuth2ClientAuthenticationProvider
*/ */
public class OAuth2ClientAuthenticationToken extends AbstractAuthenticationToken { public class OAuth2ClientAuthenticationToken extends AbstractAuthenticationToken {
private static final long serialVersionUID = SpringSecurityCoreVersion2.SERIAL_VERSION_UID; private static final long serialVersionUID = Version.SERIAL_VERSION_UID;
private String clientId; private String clientId;
private String clientSecret; private String clientSecret;
private Map<String, Object> additionalParameters; private Map<String, Object> additionalParameters;

View File

@ -17,7 +17,7 @@ package org.springframework.security.oauth2.server.authorization.authentication;
import org.springframework.security.authentication.AbstractAuthenticationToken; import org.springframework.security.authentication.AbstractAuthenticationToken;
import org.springframework.security.core.Authentication; import org.springframework.security.core.Authentication;
import org.springframework.security.core.SpringSecurityCoreVersion2; import org.springframework.security.oauth2.server.authorization.Version;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import java.util.Collections; import java.util.Collections;
@ -34,7 +34,7 @@ import java.util.Set;
* @see OAuth2ClientAuthenticationToken * @see OAuth2ClientAuthenticationToken
*/ */
public class OAuth2ClientCredentialsAuthenticationToken extends AbstractAuthenticationToken { public class OAuth2ClientCredentialsAuthenticationToken extends AbstractAuthenticationToken {
private static final long serialVersionUID = SpringSecurityCoreVersion2.SERIAL_VERSION_UID; private static final long serialVersionUID = Version.SERIAL_VERSION_UID;
private final Authentication clientPrincipal; private final Authentication clientPrincipal;
private final Set<String> scopes; private final Set<String> scopes;

View File

@ -15,7 +15,7 @@
*/ */
package org.springframework.security.oauth2.server.authorization.client; package org.springframework.security.oauth2.server.authorization.client;
import org.springframework.security.core.SpringSecurityCoreVersion2; import org.springframework.security.oauth2.server.authorization.Version;
import org.springframework.security.oauth2.core.AuthorizationGrantType; import org.springframework.security.oauth2.core.AuthorizationGrantType;
import org.springframework.security.oauth2.core.ClientAuthenticationMethod; import org.springframework.security.oauth2.core.ClientAuthenticationMethod;
import org.springframework.security.oauth2.server.authorization.config.ClientSettings; import org.springframework.security.oauth2.server.authorization.config.ClientSettings;
@ -40,7 +40,7 @@ import java.util.function.Consumer;
* @since 0.0.1 * @since 0.0.1
*/ */
public class RegisteredClient implements Serializable { public class RegisteredClient implements Serializable {
private static final long serialVersionUID = SpringSecurityCoreVersion2.SERIAL_VERSION_UID; private static final long serialVersionUID = Version.SERIAL_VERSION_UID;
private String id; private String id;
private String clientId; private String clientId;
private String clientSecret; private String clientSecret;
@ -174,7 +174,7 @@ public class RegisteredClient implements Serializable {
* A builder for {@link RegisteredClient}. * A builder for {@link RegisteredClient}.
*/ */
public static class Builder implements Serializable { public static class Builder implements Serializable {
private static final long serialVersionUID = SpringSecurityCoreVersion2.SERIAL_VERSION_UID; private static final long serialVersionUID = Version.SERIAL_VERSION_UID;
private String id; private String id;
private String clientId; private String clientId;
private String clientSecret; private String clientSecret;

View File

@ -15,7 +15,7 @@
*/ */
package org.springframework.security.oauth2.server.authorization.config; package org.springframework.security.oauth2.server.authorization.config;
import org.springframework.security.core.SpringSecurityCoreVersion2; import org.springframework.security.oauth2.server.authorization.Version;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import java.io.Serializable; import java.io.Serializable;
@ -30,7 +30,7 @@ import java.util.function.Consumer;
* @since 0.0.2 * @since 0.0.2
*/ */
public class Settings implements Serializable { public class Settings implements Serializable {
private static final long serialVersionUID = SpringSecurityCoreVersion2.SERIAL_VERSION_UID; private static final long serialVersionUID = Version.SERIAL_VERSION_UID;
private final Map<String, Object> settings; private final Map<String, Object> settings;
/** /**