|
@@ -32,6 +32,9 @@ public class User implements Serializable {
|
|
|
@JsonIgnore
|
|
|
private String exportSecret;
|
|
|
|
|
|
+ @JsonIgnore
|
|
|
+ private String accessToken;
|
|
|
+
|
|
|
private Long createTime;
|
|
|
|
|
|
private Long updateTime;
|
|
@@ -84,6 +87,14 @@ public class User implements Serializable {
|
|
|
this.exportSecret = exportSecret;
|
|
|
}
|
|
|
|
|
|
+ public String getAccessToken() {
|
|
|
+ return accessToken;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setAccessToken(String accessToken) {
|
|
|
+ this.accessToken = accessToken;
|
|
|
+ }
|
|
|
+
|
|
|
public Long getCreateTime() {
|
|
|
return createTime;
|
|
|
}
|
|
@@ -105,10 +116,6 @@ public class User implements Serializable {
|
|
|
.toLowerCase();
|
|
|
}
|
|
|
|
|
|
- public String buildAccessToken() {
|
|
|
- return ByteArray.fromString(loginName + createTime).toBase64();
|
|
|
- }
|
|
|
-
|
|
|
public boolean hasRole(Role... roles) {
|
|
|
for (Role role : roles) {
|
|
|
if (ArrayUtils.contains(this.role, role)) {
|