1、密钥、令牌管理工具
@Configuration
public class KeyConfiguration {
//随机种子
@Value("${jwt.rsa-secret}")
private String userSecret;
//token过期期限
@Value("${jwt.expire}")
private Integer expire;
//token白名单过期期限
@Value("${jwt.shortExpire}")
private Integer shortExpire;
//公钥
private byte[] userPubKey;
//密钥
private byte[] userPriKey;
public String getUserSecret() {
return userSecret;
}
public void setUserSecret(String userSecret) {
this.userSecret = userSecret;
}
public byte[] getUserPubKey() {
return userPubKey;
}
public void setUserPubKey(byte[] userPubKey) {
this.userPubKey = userPubKey;
}
public byte[] getUserPriKey() {
return userPriKey;
}
public void setUserPriKey(byte[] userPriKey) {
this.userPriKey = userPriK