Skip to content

Commit

Permalink
Skip API information for JWKS API
Browse files Browse the repository at this point in the history
  • Loading branch information
PasanT9 committed Jan 28, 2025
1 parent 979c8c4 commit 54dcde0
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.apimgt.api.APIManagementException;
import org.wso2.carbon.apimgt.api.model.subscription.CacheableEntity;
import org.wso2.carbon.apimgt.common.gateway.constants.JWTConstants;
import org.wso2.carbon.apimgt.impl.APIConstants;
import org.wso2.carbon.apimgt.impl.APIManagerConfiguration;
import org.wso2.carbon.apimgt.impl.caching.CacheInvalidationServiceImpl;
Expand Down Expand Up @@ -217,6 +218,14 @@ public API getApiByContextAndVersion(String context, String version) {
}
return null;
}
if (JWTConstants.GATEWAY_JWKS_API_CONTEXT.equals(context) && StringUtils.isEmpty(version)
&& ServiceReferenceHolder.getInstance().getAPIManagerConfigurationService()
.getAPIManagerConfiguration().getJwtConfigurationDto().isJWKSApiEnabled()) {
if (log.isDebugEnabled()) {
log.debug("Cannot retrieve API information for JWKS API");
}
return null;
}
String key = context + DELEM_PERIOD + version;
String synchronizeKey = "SubscriptionDataStoreImpl-API-" + key;
API api = apiMap.get(key);
Expand Down

0 comments on commit 54dcde0

Please sign in to comment.