diff --git a/components/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/admin/SAMLSSOConfigAdmin.java b/components/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/admin/SAMLSSOConfigAdmin.java index 3f780473a..d5a3beb83 100644 --- a/components/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/admin/SAMLSSOConfigAdmin.java +++ b/components/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/admin/SAMLSSOConfigAdmin.java @@ -86,7 +86,8 @@ public boolean addRelyingPartyServiceProvider(SAMLSSOServiceProviderDTO serviceP log.error(message); return false; } - return IdentitySAMLSSOServiceComponentHolder.getInstance().getSAMLSSOServiceProviderManager().addServiceProvider(serviceProviderDO, tenantId); + return IdentitySAMLSSOServiceComponentHolder.getInstance().getSAMLSSOServiceProviderManager() + .addServiceProvider(serviceProviderDO, tenantId); } catch (IdentityException e) { String message = "Error obtaining a registry for adding a new service provider"; throw new IdentityException(message, e); @@ -410,8 +411,8 @@ private SAMLSSOServiceProviderDTO createSAMLSSOServiceProviderDTO(SAMLSSOService public SAMLSSOServiceProviderInfoDTO getServiceProviders() throws IdentityException { SAMLSSOServiceProviderDTO[] serviceProviders = null; try { - SAMLSSOServiceProviderDO[] providersSet = IdentitySAMLSSOServiceComponentHolder.getInstance().getSAMLSSOServiceProviderManager() - .getServiceProviders(tenantId); + SAMLSSOServiceProviderDO[] providersSet = IdentitySAMLSSOServiceComponentHolder.getInstance() + .getSAMLSSOServiceProviderManager().getServiceProviders(tenantId); serviceProviders = new SAMLSSOServiceProviderDTO[providersSet.length]; for (int i = 0; i < providersSet.length; i++) { @@ -499,7 +500,8 @@ public SAMLSSOServiceProviderInfoDTO getServiceProviders() throws IdentityExcept */ public boolean removeServiceProvider(String issuer) throws IdentityException { try { - return IdentitySAMLSSOServiceComponentHolder.getInstance().getSAMLSSOServiceProviderManager().removeServiceProvider(issuer, tenantId); + return IdentitySAMLSSOServiceComponentHolder.getInstance() + .getSAMLSSOServiceProviderManager().removeServiceProvider(issuer, tenantId); } catch (IdentityException e) { throw new IdentityException("Error removing a Service Provider with issuer: " + issuer, e); } diff --git a/components/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/internal/IdentitySAMLSSOServiceComponentHolder.java b/components/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/internal/IdentitySAMLSSOServiceComponentHolder.java index a68b32368..b2c109cf2 100644 --- a/components/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/internal/IdentitySAMLSSOServiceComponentHolder.java +++ b/components/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/internal/IdentitySAMLSSOServiceComponentHolder.java @@ -44,6 +44,7 @@ public static IdentitySAMLSSOServiceComponentHolder getInstance() { * @param samlSSOServiceProviderManager SAMLSSOServiceProviderManager. */ public void setSAMLSSOServiceProviderManager(SAMLSSOServiceProviderManager samlSSOServiceProviderManager) { + this.samlSSOServiceProviderManager = samlSSOServiceProviderManager; } @@ -53,6 +54,7 @@ public void setSAMLSSOServiceProviderManager(SAMLSSOServiceProviderManager samlS * @return SAMLSSOServiceProviderManager. */ public SAMLSSOServiceProviderManager getSAMLSSOServiceProviderManager() { + return samlSSOServiceProviderManager; } diff --git a/components/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/util/SAMLSSOUtil.java b/components/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/util/SAMLSSOUtil.java index e5e58bd51..d152bb25e 100644 --- a/components/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/util/SAMLSSOUtil.java +++ b/components/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/util/SAMLSSOUtil.java @@ -1900,8 +1900,7 @@ public static boolean validateACS(String tenantDomain, String issuerName, String privilegedCarbonContext.setTenantDomain(tenantDomain); SAMLSSOServiceProviderDO spDO = IdentitySAMLSSOServiceComponentHolder.getInstance() - .getSAMLSSOServiceProviderManager().getServiceProvider(issuerName, - tenantId); + .getSAMLSSOServiceProviderManager().getServiceProvider(issuerName, tenantId); if (StringUtils.isBlank(requestedACSUrl) || !spDO.getAssertionConsumerUrlList().contains (requestedACSUrl)) { String msg = "ALERT: Invalid Assertion Consumer URL value '" + requestedACSUrl + "' in the " +