skip to Main Content

Json – Extracting values from String array from JWT object in Java?

So I am getting my JWT token with SecurityContext like so: JwtAuthenticationToken authToken = (JWTAuthenticationToken) SecurityContextHolder.getContext().getAuthentication(); if (authToken != null) { log.warn("Principal authorities:"); authToken.getAuthorities().forEach(auth -> log.warn("authorities: [{}]", auth.getAuthority())); Map<String, Object> attributes = Collections.emptyMap(); attributes = authToken.getTokenAttributes(); with my token looking…

VIEW QUESTION
Back To Top
Search