Browse Source

Serializable

zhou-hao 7 years ago
parent
commit
8988b0369b

+ 2 - 2
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-auth-server/src/main/java/org/hswebframework/web/authorization/oauth2/server/OAuth2AccessToken.java

@@ -21,13 +21,13 @@ package org.hswebframework.web.authorization.oauth2.server;
 import org.hibernate.validator.constraints.NotBlank;
 
 import javax.validation.constraints.NotNull;
+import java.io.Serializable;
 import java.util.Set;
 
 /**
- *
  * @author zhouhao
  */
-public interface OAuth2AccessToken {
+public interface OAuth2AccessToken extends Serializable {
 
     @NotBlank
     String getClientId();

+ 2 - 3
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-auth-server/src/main/java/org/hswebframework/web/authorization/oauth2/server/client/OAuth2Client.java

@@ -18,14 +18,13 @@
 
 package org.hswebframework.web.authorization.oauth2.server.client;
 
+import java.io.Serializable;
 import java.util.Set;
 
 /**
- * TODO 完成注释
- *
  * @author zhouhao
  */
-public interface OAuth2Client {
+public interface OAuth2Client extends Serializable {
     String getId();
 
     String getSecret();

+ 3 - 1
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/AccessTokenInfo.java

@@ -19,12 +19,14 @@ package org.hswebframework.web.authorization.oauth2.client;
 
 import com.alibaba.fastjson.annotation.JSONField;
 
+import java.io.Serializable;
+
 /**
  * 默认的服务实现
  *
  * @author zhouhao
  */
-public class AccessTokenInfo {
+public class AccessTokenInfo implements Serializable {
     private String id;
     //授权码
     @JSONField(name = "access_token")

+ 4 - 1
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/OAuth2ServerConfig.java

@@ -1,10 +1,13 @@
 package org.hswebframework.web.authorization.oauth2.client;
 
+import java.io.Serializable;
+
 /**
  * @author zhouhao
  * @since
  */
-public class OAuth2ServerConfig {
+public class OAuth2ServerConfig implements Serializable{
+
     private String id;
     //服务名称
     private String name;