Package com.esri.gpt.framework.security.principal

Examples of com.esri.gpt.framework.security.principal.UserAttribute


  UserAttributeMap attributes = user.getProfile();
  boolean first = true;
  List<String> sortedKeys=new ArrayList<String>(attributes.keySet());
  // Collections.sort(sortedKeys); TODO to sort or not ?
  for(int i=0; i <sortedKeys.size(); i++){
    UserAttribute attr = attributes.get(sortedKeys.get(i));
    String key = Val.chkStr(msgBroker.retrieveMessage("catalog.identity.profile.label." + attr.getKey()));
    String value = "";     
    value = Val.chkStr(attr.getValue());
    if(attr.getKey().equalsIgnoreCase("password")) continue;
    if(!first) {
      usersJson += ",";
    }else{
      first = false;
    }   
View Full Code Here


    // user profile parameters
    UserAttributeMap uaMap = idConfig.getUserAttributeMap();
    NodeList nlUserAttr = (NodeList) xpath.evaluate(
        "users/userAttributeMap/attribute", ndLdap, XPathConstants.NODESET);
    for (int i = 0; i < nlUserAttr.getLength(); i++) {
      UserAttribute attr = new UserAttribute();
      attr.setKey(xpath.evaluate("@key", nlUserAttr.item(i)));
      attr.setLdapName(xpath.evaluate("@ldapName", nlUserAttr.item(i)));

      // TODO: need to do a better check to filter out badly defined
      // parameters
      boolean bIsLdap = (idConfig.getAdapterClassName().indexOf("Ldap") != -1);
      if (bIsLdap && (attr.getLdapName().length() > 0)) {
        uaMap.add(attr);
      }
    }
    ldapConfig.getUserProperties().getUserProfileMapping().configureFromUserAttributes(uaMap);
View Full Code Here

TOP

Related Classes of com.esri.gpt.framework.security.principal.UserAttribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.