From a19e85b21decc72bedadda0221e5b35cdcb0ad87 Mon Sep 17 00:00:00 2001 From: Chang Jing Chen <107469948+D1zzzY1@users.noreply.github.com> Date: Sat, 5 Aug 2023 18:17:21 +0800 Subject: [PATCH] fix: fix JWT parse bug (#54) * feat:fix parse jwt bug * feat:fix parse jwt bug * Update CasdoorAuthService.java --------- Co-authored-by: hsluoyz --- .../java/org/casbin/casdoor/service/CasdoorAuthService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/casbin/casdoor/service/CasdoorAuthService.java b/src/main/java/org/casbin/casdoor/service/CasdoorAuthService.java index 71a0449..7f64755 100644 --- a/src/main/java/org/casbin/casdoor/service/CasdoorAuthService.java +++ b/src/main/java/org/casbin/casdoor/service/CasdoorAuthService.java @@ -99,7 +99,7 @@ public CasdoorUser parseJwtToken(String token) { throw new CasdoorAuthException("Access token not found in JWT payload."); } - return objectMapper.readValue(claimsSet.toString(), CasdoorUser.class); + return objectMapper.readValue(accessToken, CasdoorUser.class); } catch (JsonProcessingException | java.text.ParseException e) { throw new CasdoorAuthException("Cannot read access token from JWT payload.", e); }