Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ThaminduDilshan committed Oct 2, 2023
1 parent 2df0e2b commit bb5b279
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import org.wso2.carbon.identity.oauth2.util.OAuth2Util;

import java.nio.charset.Charset;
import java.util.List;

import static org.wso2.carbon.identity.auth.service.util.AuthConfigurationUtil.isAuthHeaderMatch;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@
*
* When tenant qualified urls are not enabled, we need to set the tenant domain of the oauth app to the thread
* local. This is because with the client id tenant uniqueness improvement, DAO layer requires the tenant domain
* and client id to retrieve an app and the tenant is not available in the request path. Note that when tenant
* and client id to retrieve an app when the tenant is not available in the request path. Note that when tenant
* qualified urls are disabled, client id is unique across the server.
*/
public class OAuthAppTenantResolverValve extends ValveBase {

private static final Log log = LogFactory.getLog(OAuthAppTenantResolverValve.class);
private static final Log LOG = LogFactory.getLog(OAuthAppTenantResolverValve.class);
private static String oAuthServerBaseURL = null;
private static String oAuth2ServerBaseURL = null;

Expand All @@ -74,8 +74,8 @@ public void invoke(Request request, Response response) throws IOException, Servl
clientId = credentials[0];
}
} catch (OAuthClientAuthnException e) {
if (log.isDebugEnabled()) {
log.debug("Error while extracting credentials from authorization header.", e);
if (LOG.isDebugEnabled()) {
LOG.debug("Error while extracting credentials from authorization header.", e);
}
}
}
Expand All @@ -86,10 +86,10 @@ public void invoke(Request request, Response response) throws IOException, Servl
OAuthAppDO oAuthAppDO = OAuth2Util.getAppInformationByClientIdOnly(clientId);
appTenant = OAuth2Util.getTenantDomainOfOauthApp(oAuthAppDO);
} catch (IdentityOAuth2Exception e) {
log.error("Error while getting oauth app for client Id.", e);
LOG.error("Error while getting oauth app for client Id.", e);
} catch (InvalidOAuthClientException e) {
if (log.isDebugEnabled()) {
log.debug("Error while getting oauth app for client Id: " + clientId, e);
if (LOG.isDebugEnabled()) {
LOG.debug("Error while getting oauth app for client Id: " + clientId, e);
}
}
}
Expand Down

0 comments on commit bb5b279

Please sign in to comment.