public void updateConfigurations(Property[] configurations) throws IdentityGovernanceException {
   String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();
   identityGovernanceService = new IdentityGovernanceServiceImpl();
   Map<String, String> confMap = new HashMap<>();
   for (Property configuration : configurations) {
     confMap.put(configuration.getName(), configuration.getValue());
   }
   identityGovernanceService.updateConfiguration(tenantDomain, confMap);
 }
コード例 #2
0
  /**
   * @param externalIdPConfig
   * @param name
   * @return
   */
  public static Map<String, String> getAuthenticatorPropertyMapFromIdP(
      ExternalIdPConfig externalIdPConfig, String name) {

    Map<String, String> propertyMap = new HashMap<String, String>();

    if (externalIdPConfig != null) {
      FederatedAuthenticatorConfig[] authenticatorConfigs =
          externalIdPConfig.getIdentityProvider().getFederatedAuthenticatorConfigs();

      for (FederatedAuthenticatorConfig authenticatorConfig : authenticatorConfigs) {

        if (authenticatorConfig.getName().equals(name)) {

          for (Property property : authenticatorConfig.getProperties()) {
            propertyMap.put(property.getName(), property.getValue());
          }
          break;
        }
      }
    }

    return propertyMap;
  }