1919public class Token implements JsonSerializable {
2020
2121 private String username ;
22- private String password ;
22+ private String certificate ;
2323 private String token ;
2424 private List <String > authorities ;
2525 private long expireTime ;
@@ -29,9 +29,9 @@ public class Token implements JsonSerializable {
2929 public Token () {
3030 }
3131
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 {
3333 this .username = username ;
34- this .password = AESUtils .getInstance ().encodeToBase64 (password );
34+ this .certificate = AESUtils .getInstance ().encodeToBase64 (certificate );
3535 this .authorities = authorities ;
3636 this .expireTime = System .currentTimeMillis ()+expireValue ;
3737 this .remindTime = System .currentTimeMillis ()+remindValue ;
@@ -49,13 +49,13 @@ public boolean isExpire(){
4949 }
5050
5151
52- public String getPassword (){
53- return password ;
52+ public String getCertificate (){
53+ return certificate ;
5454 }
5555
5656 @ Transient
5757 public String getDecodePassword () throws IOException {
58- return AESUtils .getInstance ().decodeToBase64 (password );
58+ return AESUtils .getInstance ().decodeToBase64 (certificate );
5959 }
6060
6161 public boolean canRestToken () {
@@ -69,7 +69,7 @@ public UsernamePasswordAuthenticationToken getAuthenticationToken(){
6969 for (String authority :authorities ){
7070 simpleGrantedAuthorities .add (new SimpleGrantedAuthority (authority ));
7171 }
72- return new UsernamePasswordAuthenticationToken (this ,password ,simpleGrantedAuthorities );
72+ return new UsernamePasswordAuthenticationToken (this , certificate ,simpleGrantedAuthorities );
7373 }
7474
7575
0 commit comments