From 8f6a0e96fda9a546a322b684b083edcfc3717b3a Mon Sep 17 00:00:00 2001 From: Vedran Pavic Date: Mon, 16 Jan 2017 00:50:02 +0100 Subject: [PATCH] Improve `UserInfoTokenServices` logging Closes gh-7995 --- .../security/oauth2/resource/UserInfoTokenServices.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/UserInfoTokenServices.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/UserInfoTokenServices.java index 1c676df54d..479dccf8da 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/UserInfoTokenServices.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/UserInfoTokenServices.java @@ -123,7 +123,7 @@ public class UserInfoTokenServices implements ResourceServerTokenServices { @SuppressWarnings({ "unchecked" }) private Map getMap(String path, String accessToken) { - this.logger.info("Getting user info from: " + path); + this.logger.debug("Getting user info from: " + path); try { OAuth2RestOperations restTemplate = this.restTemplate; if (restTemplate == null) { @@ -142,7 +142,7 @@ public class UserInfoTokenServices implements ResourceServerTokenServices { return restTemplate.getForEntity(path, Map.class).getBody(); } catch (Exception ex) { - this.logger.info("Could not fetch user details: " + ex.getClass() + ", " + this.logger.warn("Could not fetch user details: " + ex.getClass() + ", " + ex.getMessage()); return Collections.singletonMap("error", "Could not fetch user details");