public static String getPrimaryDomainName() { RealmConfiguration realmConfiguration = IdentityTenantUtil.getRealmService().getBootstrapRealmConfiguration(); if(realmConfiguration.getUserStoreProperty(UserCoreConstants.RealmConfig.PROPERTY_DOMAIN_NAME) != null){ return realmConfiguration.getUserStoreProperty( UserCoreConstants.RealmConfig.PROPERTY_DOMAIN_NAME).toUpperCase(); } else { return UserCoreConstants.PRIMARY_DEFAULT_DOMAIN_NAME; } }
public static String getPrimaryDomainName() { RealmConfiguration realmConfiguration = IdentityTenantUtil.getRealmService().getBootstrapRealmConfiguration(); if (realmConfiguration.getUserStoreProperty(UserCoreConstants.RealmConfig.PROPERTY_DOMAIN_NAME) != null) { return realmConfiguration.getUserStoreProperty( UserCoreConstants.RealmConfig.PROPERTY_DOMAIN_NAME).toUpperCase(); } else { return UserCoreConstants.PRIMARY_DEFAULT_DOMAIN_NAME; } }
protected boolean isPasswordValid(String password) { String regularExpression = this.realmConfiguration.getUserStoreProperty (LDAPServerManagerConstants.SERVICE_PASSWORD_REGEX_PROPERTY); if (regularExpression == null) { regularExpression = LDAPServerManagerConstants.DEFAULT_BE_PASSWORD_REGULAR_EXPRESSION; } log.info("Using service password format - " + regularExpression); return StringUtils.isNotEmpty(password) && isFormatCorrect(regularExpression, password); }
private void addMultiAttributeSperatorToRequestedClaims(AuthenticatedUser authenticatedUser, org.wso2.carbon.user.core.UserStoreManager userStore, Map<String, String> spRequestedClaims) { if (!spRequestedClaims.isEmpty()) { RealmConfiguration realmConfiguration = userStore.getRealmConfiguration(); String claimSeparator = realmConfiguration.getUserStoreProperty(IdentityCoreConstants .MULTI_ATTRIBUTE_SEPARATOR); if (StringUtils.isNotBlank(claimSeparator)) { spRequestedClaims.put(IdentityCoreConstants.MULTI_ATTRIBUTE_SEPARATOR, claimSeparator); } } }
private void addMultiAttributeSperatorToRequestedClaims(AuthenticatedUser authenticatedUser, org.wso2.carbon.user.core.UserStoreManager userStore, Map<String, String> spRequestedClaims) { if (!spRequestedClaims.isEmpty()) { RealmConfiguration realmConfiguration = userStore.getRealmConfiguration(); String claimSeparator = realmConfiguration.getUserStoreProperty(IdentityCoreConstants .MULTI_ATTRIBUTE_SEPARATOR); if (StringUtils.isNotBlank(claimSeparator)) { spRequestedClaims.put(IdentityCoreConstants.MULTI_ATTRIBUTE_SEPARATOR, claimSeparator); } } }
protected boolean isServerNameValid(String serverName) { String serviceNamePolicyRegEx = this.realmConfiguration.getUserStoreProperty (LDAPServerManagerConstants.SERVICE_PRINCIPLE_NAME_REGEX_PROPERTY); if (serviceNamePolicyRegEx == null) { serviceNamePolicyRegEx = LDAPServerManagerConstants.DEFAULT_BE_SERVICE_NAME_REGULAR_EXPRESSION; } log.info("Using service name format - " + serviceNamePolicyRegEx); return isFormatCorrect(serviceNamePolicyRegEx, serverName); }
protected boolean isServerNameValid(String serverName) { String serviceNamePolicyRegEx = this.realmConfiguration.getUserStoreProperty (LDAPServerManagerConstants.SERVICE_PRINCIPLE_NAME_REGEX_PROPERTY); if (serviceNamePolicyRegEx == null) { serviceNamePolicyRegEx = LDAPServerManagerConstants.DEFAULT_BE_SERVICE_NAME_REGULAR_EXPRESSION; } log.info("Using service name format - " + serviceNamePolicyRegEx); return isFormatCorrect(serviceNamePolicyRegEx, serverName); }
protected boolean isServerNameValid(String serverName) { String serviceNamePolicyRegEx = this.realmConfiguration.getUserStoreProperty (LDAPServerManagerConstants.SERVICE_PRINCIPLE_NAME_REGEX_PROPERTY); if (serviceNamePolicyRegEx == null) { serviceNamePolicyRegEx = LDAPServerManagerConstants.DEFAULT_BE_SERVICE_NAME_REGULAR_EXPRESSION; } log.info("Using service name format - " + serviceNamePolicyRegEx); return isFormatCorrect(serviceNamePolicyRegEx, serverName); }
protected boolean isPasswordValid(String password) { String regularExpression = this.realmConfiguration.getUserStoreProperty (LDAPServerManagerConstants.SERVICE_PASSWORD_REGEX_PROPERTY); if (regularExpression == null) { regularExpression = LDAPServerManagerConstants.DEFAULT_BE_PASSWORD_REGULAR_EXPRESSION; } log.info("Using service password format - " + regularExpression); return StringUtils.isNotEmpty(password) && isFormatCorrect(regularExpression, password); }
protected boolean isPasswordValid(String password) { String regularExpression = this.realmConfiguration.getUserStoreProperty (LDAPServerManagerConstants.SERVICE_PASSWORD_REGEX_PROPERTY); if (regularExpression == null) { regularExpression = LDAPServerManagerConstants.DEFAULT_BE_PASSWORD_REGULAR_EXPRESSION; } log.info("Using service password format - " + regularExpression); return StringUtils.isNotEmpty(password) && isFormatCorrect(regularExpression, password); }
public static String getPrimaryDomainName() { RealmConfiguration realmConfiguration = IdentityTenantUtil.getRealmService().getBootstrapRealmConfiguration(); if (realmConfiguration.getUserStoreProperty(UserCoreConstants.RealmConfig.PROPERTY_DOMAIN_NAME) != null) { return realmConfiguration.getUserStoreProperty( UserCoreConstants.RealmConfig.PROPERTY_DOMAIN_NAME).toUpperCase(); } else { return UserCoreConstants.PRIMARY_DEFAULT_DOMAIN_NAME; } }
private void addMultiAttributeSperatorToRequestedClaims(AuthenticatedUser authenticatedUser, org.wso2.carbon.user.core.UserStoreManager userStore, Map<String, String> spRequestedClaims) { if (!spRequestedClaims.isEmpty()) { RealmConfiguration realmConfiguration = userStore.getRealmConfiguration(); String claimSeparator = realmConfiguration.getUserStoreProperty(IdentityCoreConstants .MULTI_ATTRIBUTE_SEPARATOR); if (StringUtils.isNotBlank(claimSeparator)) { spRequestedClaims.put(IdentityCoreConstants.MULTI_ATTRIBUTE_SEPARATOR, claimSeparator); } } }
public static String getUserStoreDomainName(UserStoreManager userStoreManager) { String domainNameProperty = null; if(userStoreManager instanceof org.wso2.carbon.user.core.UserStoreManager) { domainNameProperty = ((org.wso2.carbon.user.core.UserStoreManager) userStoreManager).getRealmConfiguration() .getUserStoreProperty(UserCoreConstants.RealmConfig.PROPERTY_DOMAIN_NAME); if(StringUtils.isBlank(domainNameProperty)) { domainNameProperty = IdentityUtil.getPrimaryDomainName(); } } return domainNameProperty; }
public static String getUserStoreDomainName(UserStoreManager userStoreManager) { String domainNameProperty = null; if(userStoreManager instanceof org.wso2.carbon.user.core.UserStoreManager) { domainNameProperty = ((org.wso2.carbon.user.core.UserStoreManager) userStoreManager).getRealmConfiguration() .getUserStoreProperty(UserCoreConstants.RealmConfig.PROPERTY_DOMAIN_NAME); if(StringUtils.isBlank(domainNameProperty)) { domainNameProperty = IdentityUtil.getPrimaryDomainName(); } } return domainNameProperty; }
public static String getUserStoreDomainName(UserStoreManager userStoreManager) { String domainNameProperty = null; if(userStoreManager instanceof org.wso2.carbon.user.core.UserStoreManager) { domainNameProperty = ((org.wso2.carbon.user.core.UserStoreManager) userStoreManager).getRealmConfiguration() .getUserStoreProperty(UserCoreConstants.RealmConfig.PROPERTY_DOMAIN_NAME); if(StringUtils.isBlank(domainNameProperty)) { domainNameProperty = IdentityUtil.getPrimaryDomainName(); } } return domainNameProperty; }
protected User getUser(Map eventProperties, UserStoreManager userStoreManager){ String userName = (String) eventProperties.get(IdentityEventConstants.EventProperty.USER_NAME); String tenantDomain = (String) eventProperties.get(IdentityEventConstants.EventProperty.TENANT_DOMAIN); String domainName = userStoreManager.getRealmConfiguration().getUserStoreProperty(UserCoreConstants.RealmConfig.PROPERTY_DOMAIN_NAME); User user = new User(); user.setUserName(userName); user.setTenantDomain(tenantDomain); user.setUserStoreDomain(domainName); return user; }
public boolean isReadOnlyUserStore() throws UserProfileException { try { UserRealm realm = getUserRealm(); if ("true".equals(realm.getRealmConfiguration().getUserStoreProperty( UserCoreConstants.RealmConfig.PROPERTY_READ_ONLY))) { return true; } return false; } catch (UserStoreException e) { log.error(e.getMessage(), e); throw new UserProfileException(e.getMessage(), e); } }
@Override @Deprecated public String getAttributeName(String claimURI) throws UserStoreException { UserRealm realm = IdentityClaimManagementServiceDataHolder.getInstance().getRealmService() .getTenantUserRealm(tenantId); String primaryDomainName = realm.getRealmConfiguration().getUserStoreProperty (UserCoreConstants.RealmConfig.PROPERTY_DOMAIN_NAME); return getAttributeName(primaryDomainName, claimURI); }
@Override @Deprecated public String getAttributeName(String claimURI) throws UserStoreException { UserRealm realm = IdentityClaimManagementServiceDataHolder.getInstance().getRealmService() .getTenantUserRealm(tenantId); String primaryDomainName = realm.getRealmConfiguration().getUserStoreProperty (UserCoreConstants.RealmConfig.PROPERTY_DOMAIN_NAME); return getAttributeName(primaryDomainName, claimURI); }
@Override @Deprecated public String getAttributeName(String claimURI) throws UserStoreException { UserRealm realm = IdentityClaimManagementServiceDataHolder.getInstance().getRealmService() .getTenantUserRealm(tenantId); String primaryDomainName = realm.getRealmConfiguration().getUserStoreProperty (UserCoreConstants.RealmConfig.PROPERTY_DOMAIN_NAME); return getAttributeName(primaryDomainName, claimURI); }