Skip to content

Commit

Permalink
Merge pull request #276 from sadilchamishka/Change-error-log-to-debug…
Browse files Browse the repository at this point in the history
…-log

Change error log to debug log when fails to resolve the OAuth app by client ID when introspecting the access token
  • Loading branch information
sadilchamishka authored Jun 16, 2024
2 parents eba1d72 + 12e16e5 commit 97eda8c
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,21 @@ protected AuthenticationResult doAuthenticate(MessageContext messageContext) {
OAuth2Util.getServiceProvider(oAuth2IntrospectionResponseDTO.getClientId()).
getApplicationName();
} catch (IdentityOAuth2Exception e) {
log.error("Error occurred while getting the Service Provider by Consumer key: "
+ oAuth2IntrospectionResponseDTO.getClientId(), e);
if (log.isDebugEnabled()) {
log.debug("Error occurred while getting the Service Provider by Consumer key: "
+ oAuth2IntrospectionResponseDTO.getClientId(), e);
}
}

String serviceProviderTenantDomain = null;
try {
serviceProviderTenantDomain =
OAuth2Util.getTenantDomainOfOauthApp(oAuth2IntrospectionResponseDTO.getClientId());
} catch (InvalidOAuthClientException | IdentityOAuth2Exception e) {
log.error("Error occurred while getting the OAuth App tenantDomain by Consumer key: "
+ oAuth2IntrospectionResponseDTO.getClientId(), e);
if (log.isDebugEnabled()) {
log.debug("Error occurred while getting the OAuth App tenantDomain by Consumer key: "
+ oAuth2IntrospectionResponseDTO.getClientId(), e);
}
}

if (serviceProvider != null) {
Expand Down

0 comments on commit 97eda8c

Please sign in to comment.