private static Certificate getCertificate(String tenantDomain, int tenantId) throws Exception { Certificate publicCert = null; if (!(publicCerts.containsKey(tenantId))) { try { IdentityTenantUtil.initializeRegistry(tenantId, tenantDomain); } catch (IdentityException e) { throw new IdentityOAuth2Exception("Error occurred while loading registry for tenant " + tenantDomain, e); } // get tenant's key store manager KeyStoreManager tenantKSM = KeyStoreManager.getInstance(tenantId); KeyStore keyStore = null; if (!tenantDomain.equals(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME)) { // derive key store name String ksName = tenantDomain.trim().replace(".", "-"); String jksName = ksName + ".jks"; keyStore = tenantKSM.getKeyStore(jksName); publicCert = keyStore.getCertificate(tenantDomain); } else { publicCert = tenantKSM.getDefaultPrimaryCertificate(); } if (publicCert != null) { publicCerts.put(tenantId, publicCert); } } else { publicCert = publicCerts.get(tenantId); } return publicCert; }
IdentityTenantUtil.initializeRegistry(tenantId, tenantDomain); } catch (IdentityException e) { throw new IdentityOAuth2Exception("Error occurred while loading registry for tenant " + tenantDomain, e);
IdentityTenantUtil.initializeRegistry(tenantId, tenantDomain); Registry registry = IdentityTenantUtil.getConfigRegistry(tenantId); if (registry.resourceExists(SP_REDIRECT_URL_RESOURCE_PATH)) {
private void initializeTenantRegistry(AuthenticatedUser authenticatedUser) throws IdentityException { IdentityTenantUtil.initializeRegistry( IdentityTenantUtil.getTenantId(authenticatedUser.getTenantDomain()), authenticatedUser.getTenantDomain() ); }
private void initializeTenantRegistry(AuthenticatedUser authenticatedUser) throws IdentityException { IdentityTenantUtil.initializeRegistry( IdentityTenantUtil.getTenantId(authenticatedUser.getTenantDomain()), authenticatedUser.getTenantDomain() ); }
IdentityTenantUtil.initializeRegistry(tenantId, tenantDomain); } catch (IdentityException e) { throw new IdentityOAuth2Exception("Error occurred while loading registry for tenant " + tenantDomain, e);
IdentityTenantUtil.initializeRegistry(tenantId, tenantDomain); } catch (IdentityException e) { throw new IdentityOAuth2Exception("Error occurred while loading registry for tenant " + tenantDomain, e);
IdentityTenantUtil.initializeRegistry(tenantId, tenantDomain); } catch (IdentityException e) { throw new IdentityOAuth2Exception("Error occurred while loading registry for tenant " + tenantDomain, e);
IdentityTenantUtil.initializeRegistry(tenantId, tenantDomain); } catch (IdentityException e) { throw new IdentityOAuth2Exception("Error occurred while loading registry for tenant " + tenantDomain, e);
IdentityTenantUtil.initializeRegistry(tenantId, tenantDomain); } catch (IdentityException e) { throw new IdentityOAuth2Exception("Error occurred while loading registry for tenant " + tenantDomain,
IdentityTenantUtil.initializeRegistry(tenantId, tenantDomain); } catch (IdentityException e) { throw new IdentityOAuth2Exception("Error occurred while loading registry for tenant " +
IdentityTenantUtil.initializeRegistry(tenantID, tenantDomain);
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); String tenantDomain = IdentityTenantUtil.getTenantDomain(tenantId); IdentityTenantUtil.initializeRegistry(tenantId, tenantDomain); registry = IdentityMgtServiceComponent.getRegistryService(). getConfigSystemRegistry(PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId());
IdentityTenantUtil.initializeRegistry(tenantId, tenantDomain); identityProvider = IdentityProviderManager.getInstance().getResidentIdP(tenantDomain); } catch (IdentityProviderManagementException e) {
IdentityTenantUtil.initializeRegistry(tenantId, tenantDomain); } catch (IdentityException e) { throw new IdentityOAuth2Exception("Error occurred while loading registry for tenant " + tenantDomain, e);
IdentityTenantUtil.initializeRegistry(tenantId, tenantDomain);
IdentityTenantUtil.initializeRegistry(tenantId, tenantDomain);
try { String tenantDomain = IdentityTenantUtil.getTenantDomain(recoveryDataDO.getTenantId()); IdentityTenantUtil.initializeRegistry(recoveryDataDO.getTenantId(), tenantDomain); registry = IdentityMgtServiceComponent.getRegistryService(). getConfigSystemRegistry(PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId());
privilegedCarbonContext.setTenantDomain(tenantDomain); IdentityTenantUtil.initializeRegistry(tenantId, tenantDomain); IdentityPersistenceManager persistenceManager = IdentityPersistenceManager.getPersistanceManager(); Registry registry = (Registry) PrivilegedCarbonContext.getThreadLocalCarbonContext().getRegistry
.getServiceProvider(authnReqDTO.getIssuer()); if (ssoIdpConfigs == null) { IdentityTenantUtil.initializeRegistry(PrivilegedCarbonContext.getThreadLocalCarbonContext() .getTenantId(), PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain()); IdentityPersistenceManager persistenceManager = IdentityPersistenceManager.getPersistanceManager();