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

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


private void setupBasicCredentials(Credentials credentials,
                                    URLConnection urlCon) {

  // Currently we are only handling Basic scheme username/password encoding
  if ((credentials != null) && (credentials instanceof UsernamePasswordCredentials)) {
    UsernamePasswordCredentials upCredentials =
      (UsernamePasswordCredentials) credentials;
    String sUsername = upCredentials.getUsername();
    String sPassword = upCredentials.getPassword();
    if ((sUsername.length() > 0) || (sPassword.length() > 0)) {
      String sUserPwd = sUsername + ":" + sPassword;
      String sEncodedUserPwd = "";
      try {
        sEncodedUserPwd = Base64.encode(sUserPwd, null);
View Full Code Here


 
// constructors ================================================================

/** Default constructor. */
public LoginController() {
  setCredentials(new UsernamePasswordCredentials());
}
View Full Code Here

  try {
   
    // set the user credentials
    User user = context.getUser();
    user.reset();
    UsernamePasswordCredentials creds = new UsernamePasswordCredentials();
    creds.setUsername(getCredentials().getUsername());
    creds.setPassword(getCredentials().getPassword());
    user.setCredentials(creds);
   
    // authenticate the user
    IdentityAdapter idAdapter = context.newIdentityAdapter();
    idAdapter.authenticate(user);
View Full Code Here

*
* @return the credentials
*/
public UsernamePasswordCredentials getCredentials() {
  if(credentials == null) {
    credentials = new UsernamePasswordCredentials();
    Map<String, CredentialProvider> credMap =
      (Map<String, CredentialProvider>)
        this.getRequestContext().extractFromSession(
        ASearchEngine.SEARCH_CREDENTIAL_MAP);
    if(credMap != null) {
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.