19
19
public class Token implements JsonSerializable {
20
20
21
21
private String username ;
22
- private String password ;
22
+ private String certificate ;
23
23
private String token ;
24
24
private List <String > authorities ;
25
25
private long expireTime ;
@@ -29,9 +29,9 @@ public class Token implements JsonSerializable {
29
29
public Token () {
30
30
}
31
31
32
- public Token (String username ,String password , List <String > authorities , int expireValue , int remindValue ) throws IOException {
32
+ public Token (String username , String certificate , List <String > authorities , int expireValue , int remindValue ) throws IOException {
33
33
this .username = username ;
34
- this .password = AESUtils .getInstance ().encodeToBase64 (password );
34
+ this .certificate = AESUtils .getInstance ().encodeToBase64 (certificate );
35
35
this .authorities = authorities ;
36
36
this .expireTime = System .currentTimeMillis ()+expireValue ;
37
37
this .remindTime = System .currentTimeMillis ()+remindValue ;
@@ -49,13 +49,13 @@ public boolean isExpire(){
49
49
}
50
50
51
51
52
- public String getPassword (){
53
- return password ;
52
+ public String getCertificate (){
53
+ return certificate ;
54
54
}
55
55
56
56
@ Transient
57
57
public String getDecodePassword () throws IOException {
58
- return AESUtils .getInstance ().decodeToBase64 (password );
58
+ return AESUtils .getInstance ().decodeToBase64 (certificate );
59
59
}
60
60
61
61
public boolean canRestToken () {
@@ -69,7 +69,7 @@ public UsernamePasswordAuthenticationToken getAuthenticationToken(){
69
69
for (String authority :authorities ){
70
70
simpleGrantedAuthorities .add (new SimpleGrantedAuthority (authority ));
71
71
}
72
- return new UsernamePasswordAuthenticationToken (this ,password ,simpleGrantedAuthorities );
72
+ return new UsernamePasswordAuthenticationToken (this , certificate ,simpleGrantedAuthorities );
73
73
}
74
74
75
75
0 commit comments