Skip to content

Commit 62e94e3

Browse files
♻️ Refactored code
1 parent 56bfbe3 commit 62e94e3

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/main/java/org/rrajesh1979/utils/JWTUtil.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,4 @@ public static Pair<String, String> decodeJWT(String jws, String key) {
108108
return new Pair<>(header, payload);
109109
}
110110

111-
public static void main(String[] args) {
112-
String userInput = "{\"name\": \"Joe\", \"picture\": \"https://example.com/image.png\"}";
113-
114-
Pair<String, String> jwtAndKey = createJWT("JWT", "HS512", userInput,
115-
"rrajesh1979", "JWT Encoder", "Hello JWT", false, 0);
116-
117-
log.info("JWT :{}", jwtAndKey.getValue0());
118-
log.info("Secret Key :{}", jwtAndKey.getValue1());
119-
120-
Pair<String, String> decodedJwtAndKey = decodeJWT(jwtAndKey.getValue0(), jwtAndKey.getValue1());
121-
log.info("Decoded JWT Header :{}", decodedJwtAndKey.getValue0());
122-
log.info("Decoded JWT Key :{}", decodedJwtAndKey.getValue1());
123-
}
124-
125111
}

0 commit comments

Comments
 (0)