|
@@ -41,6 +41,7 @@ public class JwtHelper {
|
|
|
.claim("userId", jwtInfo.getUserId())
|
|
.claim("userId", jwtInfo.getUserId())
|
|
|
.claim("companyId", jwtInfo.getCompanyId())
|
|
.claim("companyId", jwtInfo.getCompanyId())
|
|
|
.claim("userName", jwtInfo.getUserName())
|
|
.claim("userName", jwtInfo.getUserName())
|
|
|
|
|
+ .claim("realName", jwtInfo.getRealName())
|
|
|
.setExpiration(DateTime.now().plusSeconds(expire).toDate())
|
|
.setExpiration(DateTime.now().plusSeconds(expire).toDate())
|
|
|
// 设置算法(必须)
|
|
// 设置算法(必须)
|
|
|
.signWith(SignatureAlgorithm.RS256, RsaUtils.getPrivateKey(priKeyPath))
|
|
.signWith(SignatureAlgorithm.RS256, RsaUtils.getPrivateKey(priKeyPath))
|
|
@@ -97,7 +98,8 @@ public class JwtHelper {
|
|
|
ObjectUtils.getStringValue(body.get("appId")),
|
|
ObjectUtils.getStringValue(body.get("appId")),
|
|
|
ObjectUtils.getLongValue(body.get("companyId")),
|
|
ObjectUtils.getLongValue(body.get("companyId")),
|
|
|
ObjectUtils.getLongValue(body.get("userId")),
|
|
ObjectUtils.getLongValue(body.get("userId")),
|
|
|
- ObjectUtils.getStringValue(body.get("userName"))
|
|
|
|
|
|
|
+ ObjectUtils.getStringValue(body.get("userName")),
|
|
|
|
|
+ ObjectUtils.getStringValue(body.get("realName"))
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|