Skip to content

Commit

Permalink
Merge pull request #1 from wso2/release-1.10.x
Browse files Browse the repository at this point in the history
Release 1.10.x
  • Loading branch information
madusankapremaratne committed Aug 28, 2015
2 parents 74141cb + 9fc0d44 commit c762c9d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
import org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO;
import org.wso2.carbon.apimgt.impl.handlers.ScopesIssuer;
import org.wso2.carbon.base.ServerConfigurationException;
import org.wso2.carbon.identity.application.common.cache.BaseCache;
import org.wso2.carbon.identity.base.IdentityException;
import org.wso2.carbon.identity.core.util.IdentityConfigParser;
import org.wso2.carbon.identity.core.util.IdentityUtil;
import org.wso2.carbon.identity.oauth.cache.BaseCache;
import org.wso2.carbon.identity.oauth.common.OAuthConstants;
import org.wso2.carbon.identity.oauth.internal.OAuthComponentServiceHolder;
import org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ public OAuthApplicationInfo createOAuthApplication(String userId, String applica
serviceProvider.setDescription("Service Provider for application " + applicationName);

ApplicationManagementService appMgtService = ApplicationManagementService.getInstance();
appMgtService.createApplication(serviceProvider);
appMgtService.createApplication(serviceProvider,tenantDomain,userName);

ServiceProvider createdServiceProvider = appMgtService.getApplication(applicationName);
ServiceProvider createdServiceProvider = appMgtService.getApplicationExcludingFileBasedSPs(applicationName,userName);

if (createdServiceProvider == null) {
throw new APIKeyMgtException("Couldn't create Service Provider Application " + applicationName);
Expand Down Expand Up @@ -228,7 +228,7 @@ public OAuthApplicationInfo createOAuthApplication(String userId, String applica
createdServiceProvider.setInboundAuthenticationConfig(inboundAuthenticationConfig);

// Update the Service Provider app to add OAuthApp as an Inbound Authentication Config
appMgtService.updateApplication(createdServiceProvider);
appMgtService.updateApplication(createdServiceProvider,tenantDomain,userName);


OAuthApplicationInfo oAuthApplicationInfo = new OAuthApplicationInfo();
Expand Down Expand Up @@ -296,18 +296,20 @@ public void deleteOAuthApplication(String consumerKey)

try {

String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();

ApplicationManagementService appMgtService = ApplicationManagementService.getInstance();

log.debug("Getting OAuth App for " + consumerKey);
String spAppName = appMgtService.getServiceProviderNameByClientId(consumerKey, "oauth2");
String spAppName = appMgtService.getServiceProviderNameByClientId(consumerKey, "oauth2",tenantDomain);

if (spAppName == null) {
log.debug("Couldn't find OAuth App for Consumer Key : " + consumerKey);
return;
}

log.debug("Removing Service Provider with name : " + spAppName);
appMgtService.deleteApplication(spAppName);
appMgtService.deleteApplication(spAppName,tenantAwareUsername,tenantDomain);


} catch (IdentityApplicationManagementException e) {
Expand Down Expand Up @@ -608,7 +610,8 @@ public void clearOAuthCache(String consumerKey, String authorizedUser) {
OAuthCache oauthCache;
CacheKey cacheKey = new OAuthCacheKey(consumerKey + ":" + authorizedUser);
if (OAuthServerConfiguration.getInstance().isCacheEnabled()) {
oauthCache = OAuthCache.getInstance();
//This needs to be picked up from a constant. Trying to resolve the build breaks
oauthCache = OAuthCache.getInstance(900000);
oauthCache.clearCacheEntry(cacheKey);
}
}
Expand Down
3 changes: 2 additions & 1 deletion features/apimgt/org.wso2.carbon.apimgt.core.feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,8 @@
<bundleDef>org.apache.woden.wso2:woden</bundleDef>
</bundles>
<importBundles>
<importBundleDef>org.wso2.carbon.identity:org.wso2.carbon.identity.thrift.authentication:${carbon.identity.version}</importBundleDef>
<!--importBundleDef>org.wso2.carbon.identity:org.wso2.carbon.identity.thrift.authentication:${carbon.identity.version}</importBundleDef-->
<importBundleDef>org.wso2.carbon.identity:org.wso2.carbon.identity.authenticator.thrift:${carbon.identity.version}</importBundleDef>
<importBundleDef>libthrift.wso2:libthrift:0.8.0.wso2v1</importBundleDef>
<importBundleDef>com.github.dblock.waffle.wso2:waffle-jna:1.6.wso2v2</importBundleDef>
<importBundleDef>org.wso2.carbon.commons:org.wso2.carbon.ganalytics.publisher:${carbon.commons.version}</importBundleDef>
Expand Down
Binary file not shown.
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -825,12 +825,12 @@

<!-- Carbon kernel version -->
<wso2carbon.version>4.4.0</wso2carbon.version>
<carbon.kernel.version>4.4.0</carbon.kernel.version>
<carbon.kernel.version>4.4.1</carbon.kernel.version>

<carbon.commons.version>4.4.3</carbon.commons.version>
<carbon.registry.version>4.4.3</carbon.registry.version>
<carbon.commons.version>4.4.4</carbon.commons.version>
<carbon.registry.version>4.4.5</carbon.registry.version>
<carbon.mediation.version>4.4.2</carbon.mediation.version>
<carbon.identity.version>4.5.2</carbon.identity.version>
<carbon.identity.version>4.5.4</carbon.identity.version>
<carbon.deployment.version>4.4.1</carbon.deployment.version>
<carbon.governance.version>4.5.1</carbon.governance.version>
<carbon.analytics.version>1.0.1</carbon.analytics.version>
Expand Down

0 comments on commit c762c9d

Please sign in to comment.