This commit is contained in:
2025-05-30 10:31:21 +08:00
parent 115edc19fa
commit 80f4491836
73 changed files with 310 additions and 485 deletions

View File

@@ -10,7 +10,6 @@ import io.jsonwebtoken.SignatureAlgorithm;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Iterator;
import java.util.Map;
/**
@@ -48,9 +47,8 @@ public class JwtAnalysisUtil {
*/
public static JwtInfo getInfoFromToken(String token, byte[] pubKey) throws Exception {
Claims body = (Claims) RsaKeyUtil.parserToken(token, pubKey).getBody();
Iterator var3 = body.entrySet().iterator();
while (var3.hasNext()) {
Map.Entry entry = (Map.Entry) var3.next();
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())
@@ -59,7 +57,7 @@ public class JwtAnalysisUtil {
&& !"name".equals(entry.getKey())
&& !"roleName".equals(entry.getKey())
&& !"scenicId".equals(entry.getKey())
&& !"expire".equals(entry.getKey()));
&& !"expire".equals(entry.getKey())) ;
}
// convert