Skip to content

Commit

Permalink
minor logging fix in GenericOAuth2Filter
Browse files Browse the repository at this point in the history
  • Loading branch information
albogdano committed Sep 8, 2021
1 parent 93d1fae commit c104060
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ public boolean isValidAccessToken(App app, User user) {
return profile != null && profile.containsKey(SecurityUtils.getSettingForApp(app,
configKey("parameters.id", alias), "sub"));
} catch (Exception e) {
LOG.error(null, e);
LOG.debug("Invalid access token {}", e);
return false;
}
}
Expand Down Expand Up @@ -326,6 +326,8 @@ private Map<String, Object> fetchProfileFromIDP(App app, String accessToken, Str
resp2.getStatusLine().getStatusCode(), resp2.getStatusLine().getReasonPhrase(), app.getId(), error);
}
EntityUtils.consumeQuietly(respEntity);
} catch (Exception e) {
LOG.error("Failed to fetch profile form IDP for app {} - {}", app.getId(), e.getMessage());
}
return profile;
}
Expand Down

0 comments on commit c104060

Please sign in to comment.