We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d25c2f5 commit 9915d18Copy full SHA for 9915d18
springboot-starter-security-jwt/src/main/java/com/codingapi/springboot/security/jwt/TokenContext.java
@@ -0,0 +1,12 @@
1
+package com.codingapi.springboot.security.jwt;
2
+
3
+import org.springframework.security.core.context.SecurityContextHolder;
4
5
+public class TokenContext {
6
7
+ private TokenContext(){}
8
9
+ public static Token current(){
10
+ return (Token)SecurityContextHolder.getContext().getAuthentication().getCredentials();
11
+ }
12
+}
0 commit comments