diff --git a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/AuthorizationGrantType.java b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/AuthorizationGrantType.java index de7a7300b6..847792ed0f 100644 --- a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/AuthorizationGrantType.java +++ b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/AuthorizationGrantType.java @@ -15,8 +15,11 @@ */ package org.springframework.security.oauth2.core; +import org.springframework.security.core.SpringSecurityCoreVersion; import org.springframework.util.Assert; +import java.io.Serializable; + /** * An authorization grant is a credential representing the resource owner's authorization * (to access it's protected resources) to the client and used by the client to obtain an access token. @@ -30,7 +33,8 @@ import org.springframework.util.Assert; * @since 5.0 * @see Section 1.3 Authorization Grant */ -public final class AuthorizationGrantType { +public final class AuthorizationGrantType implements Serializable { + private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID; public static final AuthorizationGrantType AUTHORIZATION_CODE = new AuthorizationGrantType("authorization_code"); public static final AuthorizationGrantType IMPLICIT = new AuthorizationGrantType("implicit"); private final String value; diff --git a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/endpoint/AuthorizationRequest.java b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/endpoint/AuthorizationRequest.java index ba7b217c47..2a4fdce26f 100644 --- a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/endpoint/AuthorizationRequest.java +++ b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/endpoint/AuthorizationRequest.java @@ -15,6 +15,7 @@ */ package org.springframework.security.oauth2.core.endpoint; +import org.springframework.security.core.SpringSecurityCoreVersion; import org.springframework.security.oauth2.core.AuthorizationGrantType; import org.springframework.util.Assert; import org.springframework.util.CollectionUtils; @@ -38,6 +39,7 @@ import java.util.Set; * @see Section 4.2.1 Implicit Grant Request */ public final class AuthorizationRequest implements Serializable { + private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID; private String authorizationUri; private AuthorizationGrantType authorizationGrantType; private ResponseType responseType; diff --git a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/endpoint/ResponseType.java b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/endpoint/ResponseType.java index f8feffcdd4..02c5596d7d 100644 --- a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/endpoint/ResponseType.java +++ b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/endpoint/ResponseType.java @@ -15,8 +15,11 @@ */ package org.springframework.security.oauth2.core.endpoint; +import org.springframework.security.core.SpringSecurityCoreVersion; import org.springframework.util.Assert; +import java.io.Serializable; + /** * The response_type parameter is consumed by the authorization endpoint which * is used by the authorization code grant type and implicit grant type. @@ -30,7 +33,8 @@ import org.springframework.util.Assert; * @since 5.0 * @see Section 3.1.1 Response Type */ -public final class ResponseType { +public final class ResponseType implements Serializable { + private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID; public static final ResponseType CODE = new ResponseType("code"); public static final ResponseType TOKEN = new ResponseType("token"); private final String value;