Package com.esri.gpt.framework.security.identity

Examples of com.esri.gpt.framework.security.identity.IdentityConfiguration


* @param configuration the identity configuration
*/
private void setIdentityConfiguration(IdentityConfiguration configuration) {
  _identityConfiguration = configuration;
  if (_identityConfiguration == null) {
    _identityConfiguration = new IdentityConfiguration();
  }
}
View Full Code Here


* Sets the identity configuration associated with this application.
* @param configuration the identity configuration
*/
private void setIdentityConfiguration(IdentityConfiguration configuration) {
  _identityConfiguration = configuration;
  if (_identityConfiguration == null) _identityConfiguration = new IdentityConfiguration();
}
View Full Code Here

* Gets the user associated with new registration requests.
* @return the user associated with new registration requests
*/
public User getNewUser() {
  if (_newUser == null) {
    IdentityConfiguration idConfig = getIdentityConfiguration();
    _newUser = new User();
    _newUser.setCredentials(new UsernamePasswordCredentials());
    _newUser.setProfile(new UserAttributeMap(idConfig.getUserAttributeMap()));
  }
  return _newUser;
}
View Full Code Here

// constructors ================================================================
/** Default constructor. */
public ApplicationConfiguration() {
  super();
  setDatabaseReferences(new DatabaseReferences());
  setIdentityConfiguration(new IdentityConfiguration());
  setCatalogConfiguration(new CatalogConfiguration());
  setMailConfiguration(new MailConfiguration());
  setThreadSchedulerConfiguration(new ThreadSchedulerConfiguration());
  setDownloadDataConfiguration(new DownloadConfiguration());
  setMetadataAccessPolicy(new MetadataAccessPolicy());
View Full Code Here

* @param configuration the identity configuration
*/
private void setIdentityConfiguration(IdentityConfiguration configuration) {
  _identityConfiguration = configuration;
  if (_identityConfiguration == null) {
    _identityConfiguration = new IdentityConfiguration();
  }
}
View Full Code Here

  } catch (NotAuthorizedException e) {
    response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "{ \"error\":\"Not Authorized.\"}");
    return;
  }
  String[] parts = request.getRequestURI().toString().split("/");
  IdentityConfiguration idConfig = context.getIdentityConfiguration();
  if(idConfig != null){
    LdapConfiguration ldapConfig = idConfig.getLdapConfiguration();
    if(ldapConfig != null){
        userDIT = ldapConfig.getUserProperties().getUserSearchDIT();
      groupDIT = ldapConfig.getGroupProperties().getGroupSearchDIT();
    }
  }
View Full Code Here

    user.setDistinguishedName(member);
    idAdapter.readUserProfile(user);
    if(parts.length > 0) {
    String groupIdentifier = URLDecoder.decode(parts[5].trim(),"UTF-8");
    if(!groupIdentifier.endsWith(groupDIT)){
        IdentityConfiguration idConfig = context.getIdentityConfiguration();  
        Roles configuredRoles = idConfig.getConfiguredRoles();    
      Role roleRegistered = configuredRoles.get(groupIdentifier);   
      groupIdentifier = roleRegistered.getDistinguishedName();
    }
      boolean isSelf = checkSelf(context,member);
      if((isSelf && attempt.equals("2")) || !isSelf){
View Full Code Here

* @param context
*          the current request context (contains the active user)
* @return the collection of roles
*/
protected Roles buildSelectableRoles(RequestContext context) {
  IdentityConfiguration idConfig = context.getIdentityConfiguration();
  Roles selectableRoles = idConfig.getConfiguredRoles();
  return selectableRoles;
}
View Full Code Here

  Group mgmtGroup = checkManagementGroup(context,userDN);
  if (mgmtGroup != null) {
    setKey(mgmtGroup.getKey());
    setDistinguishedName(mgmtGroup.getDistinguishedName());
    setName(mgmtGroup.getName());
    IdentityConfiguration idConfig = context.getIdentityConfiguration();
    Role pubRole = idConfig.getConfiguredRoles().get("gptPublisher");
    if (pubRole != null) {
      RoleSet roles = getAuthenticationStatus().getAuthenticatedRoles();
      roles.addAll(pubRole.getFullRoleSet());
    }
   
View Full Code Here

* @return the collection of groups that can be selected
*/
public static Groups buildSelectableGroups(RequestContext context) {

  IdentityAdapter idAdapter = context.newIdentityAdapter();
  IdentityConfiguration idConfig = context.getIdentityConfiguration();
  Groups selectableGroups = null;

  User user = context.getUser();
  RoleSet roles = user.getAuthenticationStatus().getAuthenticatedRoles();
  boolean bIsAdministrator = roles.hasRole("gptAdministrator");

  try {
    if (bIsAdministrator) {
      User selectableUser = new User();
      selectableUser.setDistinguishedName("*");
      idAdapter.readUserGroups(selectableUser);
      selectableGroups = selectableUser.getGroups();
    } else {
      selectableGroups = user.getGroups();
    }
    Groups mgmtGroups = idConfig.getMetadataManagementGroups();
    if ((mgmtGroups != null) && (mgmtGroups.size() > 0)) {
      for (Group mgmtGroup : mgmtGroups.values()) {
        boolean bAdd = bIsAdministrator;
        if ((selectableGroups != null)
            && selectableGroups.containsKey(mgmtGroup.getKey())) {
View Full Code Here

TOP

Related Classes of com.esri.gpt.framework.security.identity.IdentityConfiguration

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.