Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /java /verifiable_token_based_authentication /wjs1995_sb-jwt-auth-starter.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Subject", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No in-repo client sends a Bearer token to the JwtAuthenticationFilter (src/main/java/cloud/xiaoweiyun/auth/filters/JwtAuthenticationFilter.java:36 reads the Authorization header); callers are outside this starter library." | |
| }, | |
| { | |
| "role": "Enforcer", | |
| "status": "present", | |
| "symbol": "doFilterInternal", | |
| "file": "src/main/java/cloud/xiaoweiyun/auth/filters/JwtAuthenticationFilter.java", | |
| "lines": "34", | |
| "notes": "doFilterInternal in JwtAuthenticationFilter (OncePerRequestFilter), registered via addFilterBefore in SecurityConfig.securityFilterChain (src/main/java/cloud/xiaoweiyun/auth/SecurityConfig.java:35) with anyRequest().authenticated(). It extracts the Bearer token, calls jwtUtil.extractUsername (line 45) and jwtUtil.validateToken (line 69), writes an error response on parse/signature/expiry failure, and otherwise sets the SecurityContext authentication." | |
| }, | |
| { | |
| "role": "Verifier", | |
| "status": "present", | |
| "symbol": "validateToken", | |
| "file": "src/main/java/cloud/xiaoweiyun/auth/JwtUtil.java", | |
| "lines": "63", | |
| "notes": "Reached from doFilterInternal at JwtAuthenticationFilter.java:69; validateToken in JwtUtil re-parses the signed JWT via extractAllClaims, checks the subject matches and that the token is not expired, giving the final accept/reject. Work is shared with extractUsername (JwtUtil.java:68, called at filter line 45) and parseToken (JwtUtil.java:28, via CustomUserDetailsService.loadUserByJwt) which builds the UserEntity principal." | |
| }, | |
| { | |
| "role": "Key manager", | |
| "status": "present", | |
| "symbol": "secret", | |
| "file": "src/main/java/cloud/xiaoweiyun/auth/JwtUtil.java", | |
| "lines": "15", | |
| "notes": "Verifier validateToken -> extractAllClaims uses setSigningKey(secret) at JwtUtil.java:73. The HMAC key is a hard-coded string field in JwtUtil (\"wangjinsheng\") with no retrieving method, so the field is cited; it is also used for signing at line 59." | |
| }, | |
| { | |
| "role": "Cryptographer", | |
| "status": "external", | |
| "symbol": "parseClaimsJws", | |
| "file": "src/main/java/cloud/xiaoweiyun/auth/JwtUtil.java", | |
| "lines": "73", | |
| "notes": "Verifier validateToken -> extractAllClaims (JwtUtil.java:72) calls jjwt Jwts.parser().setSigningKey(secret).parseClaimsJws(token), which verifies the HS256 MAC (and expiry). Same call also at parseToken line 33; signing uses jjwt signWith(HS256) at line 59." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "This is a starter library with only security machinery (JwtUtil, SecurityConfig, filter, CustomUserDetailsService); no controller or business handler exists behind filterChain.doFilter (JwtAuthenticationFilter.java:78)." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 2.98 kB
- Xet hash:
- 995c68b74ba38034f48c962b67a366b0c289bd99dd6114684e8ae8766bd70895
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.