From c0703b049a42102e12cf5229bbab5187827393ce Mon Sep 17 00:00:00 2001 From: sadilchamishka Date: Fri, 14 Jun 2024 20:17:09 +0530 Subject: [PATCH 1/2] Change error log to debug log when fails to resolve the ouath app by only client ID when intropsecting the access token --- .../auth/service/handler/impl/OAuth2AccessTokenHandler.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/org.wso2.carbon.identity.auth.service/src/main/java/org/wso2/carbon/identity/auth/service/handler/impl/OAuth2AccessTokenHandler.java b/components/org.wso2.carbon.identity.auth.service/src/main/java/org/wso2/carbon/identity/auth/service/handler/impl/OAuth2AccessTokenHandler.java index 5c59c94b..50f0e87f 100644 --- a/components/org.wso2.carbon.identity.auth.service/src/main/java/org/wso2/carbon/identity/auth/service/handler/impl/OAuth2AccessTokenHandler.java +++ b/components/org.wso2.carbon.identity.auth.service/src/main/java/org/wso2/carbon/identity/auth/service/handler/impl/OAuth2AccessTokenHandler.java @@ -182,8 +182,10 @@ protected AuthenticationResult doAuthenticate(MessageContext messageContext) { 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) { From 12e16e59d63bc2ed9f73b3c29cbd282eff729b5c Mon Sep 17 00:00:00 2001 From: sadilchamishka Date: Sun, 16 Jun 2024 10:50:33 +0530 Subject: [PATCH 2/2] Change error log of SP not found to debug log --- .../auth/service/handler/impl/OAuth2AccessTokenHandler.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/org.wso2.carbon.identity.auth.service/src/main/java/org/wso2/carbon/identity/auth/service/handler/impl/OAuth2AccessTokenHandler.java b/components/org.wso2.carbon.identity.auth.service/src/main/java/org/wso2/carbon/identity/auth/service/handler/impl/OAuth2AccessTokenHandler.java index 50f0e87f..a9c4dbff 100644 --- a/components/org.wso2.carbon.identity.auth.service/src/main/java/org/wso2/carbon/identity/auth/service/handler/impl/OAuth2AccessTokenHandler.java +++ b/components/org.wso2.carbon.identity.auth.service/src/main/java/org/wso2/carbon/identity/auth/service/handler/impl/OAuth2AccessTokenHandler.java @@ -173,8 +173,10 @@ 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;