This commit is contained in:
2025-06-28 13:47:35 +08:00
parent 206696deb8
commit 66334b8963

View File

@ -48,19 +48,7 @@ public class JwtAnalysisUtil {
* @throws Exception * @throws Exception
*/ */
public static JwtInfo getInfoFromToken(String token, byte[] pubKey) throws Exception { public static JwtInfo getInfoFromToken(String token, byte[] pubKey) throws Exception {
Claims body = (Claims) RsaKeyUtil.parserToken(token, pubKey).getBody(); Claims body = RsaKeyUtil.parserToken(token, pubKey).getBody();
for (Map.Entry<String, Object> stringObjectEntry : body.entrySet()) {
Map.Entry<String, Object> entry = stringObjectEntry;
if (!"sub".equals(entry.getKey())
&& !"userId".equals(entry.getKey())
&& !"phone".equals(entry.getKey())
&& !"roleId".equals(entry.getKey())
&& !"account".equals(entry.getKey())
&& !"name".equals(entry.getKey())
&& !"roleName".equals(entry.getKey())
&& !"scenicId".equals(entry.getKey())
&& !"expire".equals(entry.getKey())) ;
}
// convert // convert
LocalDateTime expireTime = null; LocalDateTime expireTime = null;