修复 sa-token-temp-jwt 模块代码警告

This commit is contained in:
click33 2023-05-16 16:40:48 +08:00
parent 18d2628967
commit 5bae8504da
2 changed files with 7 additions and 13 deletions

View File

@ -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();
}
/**

View File

@ -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());
}
/**