IdentityPersistenceManager dbman = null;
String host = null;
RelyingPartyDO rp = null;
String alias = null;
String keyStoreName = null;
ServerConfiguration serverConfig = null;
host = IdentityProviderUtil.getAppliesToHostName(data);
serverConfig = ServerConfiguration.getInstance();
String userName = UserCoreUtil.getTenantLessUsername(userIdentifier);
try {
dbman = IdentityPersistenceManager.getPersistanceManager();
} catch (Exception e) {
log.error("Error while instantiating IdentityUserStore", e);
throw new IdentityProviderException("Error while instantiating IdentityUserStore", e);
}
try {
rp = dbman.getGloballyTrustedRelyingParty(IdentityTenantUtil
.getRegistry(null, userName), host);
} catch (Exception ignore) {
// Lets proceed with the user trusted relying parties.
}
keyStoreName = serverConfig.getFirstProperty("Security.KeyStore.Location");
if (rp != null) {
// This is a globally trusted RP
alias = rp.getAlias();
// Get key store name