Add logging for JWT in MeController
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
@ -1,12 +1,13 @@
|
|||||||
package se.urmo.hemhub.web;
|
package se.urmo.hemhub.web;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.security.core.Authentication;
|
import org.springframework.security.core.Authentication;
|
||||||
import org.springframework.security.oauth2.jwt.Jwt;
|
import org.springframework.security.oauth2.jwt.Jwt;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
public class MeController {
|
public class MeController {
|
||||||
|
|
||||||
@ -18,7 +19,7 @@ public class MeController {
|
|||||||
|
|
||||||
// ---- Läs roller på ett säkert sätt ----
|
// ---- Läs roller på ett säkert sätt ----
|
||||||
List<String> roles = extractRealmRoles(jwt);
|
List<String> roles = extractRealmRoles(jwt);
|
||||||
|
log.info("Jwt: {}", jwt);
|
||||||
// ---- Bygg svar ----
|
// ---- Bygg svar ----
|
||||||
Map<String, Object> response = new LinkedHashMap<>();
|
Map<String, Object> response = new LinkedHashMap<>();
|
||||||
response.put("sub", jwt.getSubject());
|
response.put("sub", jwt.getSubject());
|
||||||
|
|||||||
Reference in New Issue
Block a user