diff --git a/libs/security-core/src/main/java/no/nav/testnav/libs/securitycore/command/tokenx/OnBehalfOfExchangeCommand.java b/libs/security-core/src/main/java/no/nav/testnav/libs/securitycore/command/tokenx/OnBehalfOfExchangeCommand.java index 98cbd2600dd..036b1bdf314 100644 --- a/libs/security-core/src/main/java/no/nav/testnav/libs/securitycore/command/tokenx/OnBehalfOfExchangeCommand.java +++ b/libs/security-core/src/main/java/no/nav/testnav/libs/securitycore/command/tokenx/OnBehalfOfExchangeCommand.java @@ -8,7 +8,6 @@ import lombok.extern.slf4j.Slf4j; import no.nav.testnav.libs.securitycore.command.ExchangeCommand; import no.nav.testnav.libs.securitycore.domain.AccessToken; -import no.nav.testnav.libs.securitycore.domain.Token; import no.nav.testnav.libs.securitycore.domain.tokenx.TokenXProperties; import no.nav.testnav.libs.securitycore.domain.tokenx.WellKnown; import org.springframework.web.reactive.function.BodyInserters; @@ -31,7 +30,6 @@ public class OnBehalfOfExchangeCommand implements ExchangeCommand { @Override public Mono call() { - log.info("Access token opprettet for OAuth 2.0 On-Behalf-Of Flow. Scope: {}.", scope); return webClient .get() .uri(tokenX.getWellKnownUrl()) @@ -60,6 +58,7 @@ public Mono call() { throwable -> !(throwable instanceof WebClientResponseException), throwable -> log.error("Feil ved henting av access token.", throwable) ) + .doOnSuccess(accessToken -> log.info("Access token opprettet for OAuth 2.0 On-Behalf-Of Flow. Scope: {}.", scope)) ); } diff --git a/proxies/fullmakt-proxy/src/main/java/no/nav/testnav/proxies/fullmaktproxy/consumer/command/FakedingsGetCommand.java b/proxies/fullmakt-proxy/src/main/java/no/nav/testnav/proxies/fullmaktproxy/consumer/command/FakedingsGetCommand.java index 6651e253c50..9e69f3021a7 100644 --- a/proxies/fullmakt-proxy/src/main/java/no/nav/testnav/proxies/fullmaktproxy/consumer/command/FakedingsGetCommand.java +++ b/proxies/fullmakt-proxy/src/main/java/no/nav/testnav/proxies/fullmaktproxy/consumer/command/FakedingsGetCommand.java @@ -28,4 +28,4 @@ public Mono call() { .bodyToMono(String.class) .doOnError(throwable -> log.error("Feil ved henting av fakedings token i fullmakt-proxy", throwable)); } -} +} \ No newline at end of file