diff --git a/libs/servlet-security/src/main/java/no/nav/testnav/libs/servletsecurity/action/GetUserInfo.java b/libs/servlet-security/src/main/java/no/nav/testnav/libs/servletsecurity/action/GetUserInfo.java index d015789f002..9d1399ab534 100644 --- a/libs/servlet-security/src/main/java/no/nav/testnav/libs/servletsecurity/action/GetUserInfo.java +++ b/libs/servlet-security/src/main/java/no/nav/testnav/libs/servletsecurity/action/GetUserInfo.java @@ -6,7 +6,6 @@ import no.nav.testnav.libs.securitycore.config.UserConstant; import no.nav.testnav.libs.securitycore.domain.UserInfo; import org.springframework.beans.factory.annotation.Value; -import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Component; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; @@ -26,8 +25,6 @@ public GetUserInfo(@Value("${JWT_SECRET:#{null}}") String secret) { @Override public Optional call() { - var test = SecurityContextHolder.getContext().getAuthentication(); - log.info(test.getName()); var request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); log.trace("Prøver å hente JWT fra request..."); return Optional.ofNullable(request.getHeader(UserConstant.USER_HEADER_JWT)).map(token -> {