use of org.wso2.carbon.apimgt.impl.utils.APIAuthenticationAdminClient in project carbon-apimgt by wso2.
the class KeyManagerUserOperationListener method clearGatewayUsernameCache.
/**
* Removes a given username that is cached on the API Gateway.
*
* @param username The username to be cleared from the cache
*/
private void clearGatewayUsernameCache(String username) {
APIAuthenticationAdminClient client = getApiAuthenticationAdminClient();
client.invalidateCachedUsername(getEndUserName(username));
}
use of org.wso2.carbon.apimgt.impl.utils.APIAuthenticationAdminClient in project carbon-apimgt by wso2.
the class KeyManagerUserOperationListener method clearGatewayUsernameCache.
/**
* Removes a given list of username that is cached on the API Gateway.
*
* @param usernameList The list of username to be cleared from the cache
*/
private void clearGatewayUsernameCache(String[] usernameList) {
APIAuthenticationAdminClient client = getApiAuthenticationAdminClient();
for (int i = 0; i < usernameList.length; i++) {
usernameList[i] = getEndUserName(usernameList[i]);
}
client.invalidateCachedUsernames(usernameList);
log.debug("Removed cached usernames of the Gateway.");
}
use of org.wso2.carbon.apimgt.impl.utils.APIAuthenticationAdminClient in project carbon-apimgt by wso2.
the class APIProviderImpl method invalidateResourceCache.
protected void invalidateResourceCache(String apiContext, String apiVersion, Set<URITemplate> uriTemplates) {
APIAuthenticationAdminClient client = new APIAuthenticationAdminClient();
client.invalidateResourceCache(apiContext, apiVersion, uriTemplates);
}
Aggregations