Package com.esri.gpt.framework.security.credentials

Examples of com.esri.gpt.framework.security.credentials.UsernamePasswordCredentials


* Creates new credentials.
* @return credentials
*/
public UsernamePasswordCredentials newCredentials() {
  if (userName.length() > 0 && password.length() > 0) {
    return new UsernamePasswordCredentials(userName, password);
  } else {
    return null;
  }
}
View Full Code Here


* Creates new credentials.
* @return credentials
*/
public UsernamePasswordCredentials newCredentials() {
  if (userName.length()>0 && password.length()>0) {
    return new UsernamePasswordCredentials(userName,password);
  } else {
    return null;
  }
}
View Full Code Here

* @param context the current request context
* @return true is the functionality is enabled
*/
protected boolean checkHasManageUsers(RequestContext context) {
  boolean umHasDeleteUserLink = false;
  UsernamePasswordCredentials upc = context.getIdentityConfiguration().getSimpleConfiguration().getServiceAccountCredentials();
  if(upc !=null) return umHasDeleteUserLink;
 
  StringAttributeMap umParameters = context.getCatalogConfiguration().getParameters();
  if(umParameters.containsKey("ldap.identity.manage.userRoleEnabled")){ 
    String umHasDeleteUserLinkEnabled = com.esri.gpt.framework.util.Val.chkStr(umParameters.getValue("ldap.identity.manage.userRoleEnabled"));
View Full Code Here

  user.setLocalID(user.getLocalID());
  user.setDistinguishedName(user.getDistinguishedName());
  user.setName(user.getName());
 
  // establish credentials
  UsernamePasswordCredentials creds = new UsernamePasswordCredentials();
  creds.setUsername(user.getName());
  user.setCredentials(creds);
 
  user.setAuthenticationStatus(user.getAuthenticationStatus())
  assertAdministratorRole(user);
}
View Full Code Here

  setLocalID(user.getLocalID());
  setDistinguishedName(user.getDistinguishedName());
  setName(user.getName());
 
  // establish credentials
  UsernamePasswordCredentials creds = new UsernamePasswordCredentials();
  creds.setUsername(getName());
  setCredentials(creds);
 
  this.setAuthenticationStatus(user.getAuthenticationStatus());
 
  // assert a publishing role, ensure proper ArcIMS permissions
View Full Code Here

    setCredentials(dnCred);
    context.newIdentityAdapter().authenticate(this);
  }

  // establish credentials
  UsernamePasswordCredentials creds = new UsernamePasswordCredentials();
  creds.setUsername(getName());
  setCredentials(creds);
 
  // assert a publishing role, ensure proper ArcIMS permissions
  assertPublisherRole();
  ImsPermissionDao dao = new ImsPermissionDao(context);
View Full Code Here

  DistinguishedNameCredential dnCred = new DistinguishedNameCredential(sAdminDN);
  admin.setCredentials(dnCred);
  context.newIdentityAdapter().authenticate(admin);
 
  // establish credentials
  UsernamePasswordCredentials creds = new UsernamePasswordCredentials();
  creds.setUsername(admin.getName());
  admin.setCredentials(creds);
 
  // assert a publishing role, ensure proper ArcIMS permissions
  admin.assertAdministratorRole();
  ImsPermissionDao dao = new ImsPermissionDao(context);
View Full Code Here

/**
* Gets user credentials.
* @return user credentials
*/
private UsernamePasswordCredentials getCredentials() {
  UsernamePasswordCredentials credentials =
    new UsernamePasswordCredentials();

  if (getUserName().length() > 0 && getUserPassword().length() > 0) {
    credentials.setUsername(getUserName());
    credentials.setPassword(getUserPassword());
  }

  return credentials;
}
View Full Code Here

* Creates new credentials.
* @return credentials
*/
public UsernamePasswordCredentials newCredentials() {
  if (userName.length() > 0 && password.length() > 0) {
    return new UsernamePasswordCredentials(userName, password);
  } else {
    return null;
  }
}
View Full Code Here

  sEngine.setMessageBroker(messageBroker);
  sEngine.setResourceLinkBuilder(
       ResourceLinkBuilder.newBuilder(context, hReq, messageBroker));
 
  if(username != null && "".equals(username.trim())) {
    UsernamePasswordCredentials cred = new UsernamePasswordCredentials();
    cred.setUsername(username);
    cred.setPassword(password);
    sEngine.setCredentials(cred);
  }
  sEngine.init();
}
View Full Code Here

TOP

Related Classes of com.esri.gpt.framework.security.credentials.UsernamePasswordCredentials

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.