add
This commit is contained in:
@ -23,10 +23,6 @@ public class LoginUser implements UserDetails {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 设备号 暂用UUID
|
||||
*/
|
||||
private String deviceSn;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ -64,8 +60,7 @@ public class LoginUser implements UserDetails {
|
||||
public LoginUser() {
|
||||
}
|
||||
|
||||
public LoginUser(String deviceSn, String userId, String deptId, String username, String nickname, List<RoleDto> roles, List<String> roleKeys, Set<String> permissions) {
|
||||
this.deviceSn = deviceSn;
|
||||
public LoginUser(String userId, String deptId, String username, String nickname, List<RoleDto> roles, List<String> roleKeys, Set<String> permissions) {
|
||||
this.userId = userId;
|
||||
this.deptId = deptId;
|
||||
this.username = username;
|
||||
@ -75,14 +70,6 @@ public class LoginUser implements UserDetails {
|
||||
this.roles = roles;
|
||||
}
|
||||
|
||||
public String getDeviceSn() {
|
||||
return deviceSn;
|
||||
}
|
||||
|
||||
public void setDeviceSn(String deviceSn) {
|
||||
this.deviceSn = deviceSn;
|
||||
}
|
||||
|
||||
public List<RoleDto> getRoles() {
|
||||
return roles;
|
||||
}
|
||||
|
@ -17,12 +17,10 @@ import javax.servlet.http.HttpServletRequest;
|
||||
*/
|
||||
public class TokenUtil {
|
||||
|
||||
|
||||
/**
|
||||
* jwt 加解密密钥,第一次项目启动时创建随机数
|
||||
* token 过期时间 单位: 小时
|
||||
*/
|
||||
public static String secret;
|
||||
public static Integer expireTime = 72;
|
||||
public static final Integer TOKEN_EXPIRE_HOUR_TIME = 3;
|
||||
private static final String TOKEN_TEMPLATE = "{}:{}";
|
||||
|
||||
public static String generateToken(String username, String deviceSn) {
|
||||
|
Reference in New Issue
Block a user