mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-04-05 17:37:53 +08:00
修复 sa-token-temp-jwt 模块代码警告
This commit is contained in:
parent
18d2628967
commit
5bae8504da
@ -80,13 +80,10 @@ public class SaJwtUtil {
|
||||
* @return Claims对象
|
||||
*/
|
||||
public static Claims parseToken(String jwtToken, String keyt) {
|
||||
// 解析出载荷
|
||||
Claims claims = Jwts.parser()
|
||||
.setSigningKey(keyt.getBytes())
|
||||
.parseClaimsJws(jwtToken).getBody();
|
||||
|
||||
// 返回
|
||||
return claims;
|
||||
// 解析出载荷
|
||||
return Jwts.parser()
|
||||
.setSigningKey(keyt.getBytes())
|
||||
.parseClaimsJws(jwtToken).getBody();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -35,8 +35,7 @@ public class SaTempForJwt implements SaTempInterface {
|
||||
*/
|
||||
@Override
|
||||
public String createToken(String service, Object value, long timeout) {
|
||||
String token = SaJwtUtil.createToken(service, value, timeout, getJwtSecretKey());
|
||||
return token;
|
||||
return SaJwtUtil.createToken(service, value, timeout, getJwtSecretKey());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -44,8 +43,7 @@ public class SaTempForJwt implements SaTempInterface {
|
||||
*/
|
||||
@Override
|
||||
public Object parseToken(String service, String token) {
|
||||
Object value = SaJwtUtil.getValue(service, token, getJwtSecretKey());
|
||||
return value;
|
||||
return SaJwtUtil.getValue(service, token, getJwtSecretKey());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -53,8 +51,7 @@ public class SaTempForJwt implements SaTempInterface {
|
||||
*/
|
||||
@Override
|
||||
public long getTimeout(String service, String token) {
|
||||
long timeout = SaJwtUtil.getTimeout(service, token, getJwtSecretKey());
|
||||
return timeout;
|
||||
return SaJwtUtil.getTimeout(service, token, getJwtSecretKey());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user