Examples of UsernamePassword


Examples of com.alibaba.antx.config.resource.AuthenticationHandler.UsernamePassword

                message = "\n";
                message += "Authentication required.\n";
                message += "realm: " + scheme.getRealm() + "\n";
                message += "  uri: " + uri + "\n";

                UsernamePassword up = getResourceManager().getAuthenticationHandler().authenticate(message, uri,
                        username, visitedURIs.contains(key));

                visitedURIs.add(key);

                return new UsernamePasswordCredentials(up.getUsername(), up.getPassword());
            }
        });
    }
View Full Code Here

Examples of com.alibaba.antx.config.resource.AuthenticationHandler.UsernamePassword

                message = "\n";
                message += "Authentication required.\n";
                message += "realm: " + scheme.getRealm() + "\n";
                message += "  uri: " + uri + "\n";

                UsernamePassword up = getResourceManager().getAuthenticationHandler().authenticate(message, uri,
                                                                                                   username, visitedURIs.contains(key));

                visitedURIs.add(key);

                return new UsernamePasswordCredentials(up.getUsername(), up.getPassword());
            }
        });
    }
View Full Code Here

Examples of com.alibaba.antx.config.resource.AuthenticationHandler.UsernamePassword

                message = "\n";
                message += "Authentication required.\n";
                message += "realm: " + scheme.getRealm() + "\n";
                message += "  uri: " + uri + "\n";

                UsernamePassword up = getResourceManager().getAuthenticationHandler().authenticate(message, uri,
                        username, visitedURIs.contains(key));

                visitedURIs.add(key);

                return new UsernamePasswordCredentials(up.getUsername(), up.getPassword());
            }
        });
    }
View Full Code Here

Examples of com.woorea.openstack.keystone.model.authentication.UsernamePassword

  }

  public Access getAccessByTenant(String tenantName) {
    Access access = hashTenantAccess.get(tenantName);
    if (access == null) {
      access = keystone.tokens().authenticate(new UsernamePassword(username, password))
        .withTenantName(tenantName)
        .execute();
      hashTenantAccess.put(tenantName, access);
    }
    return access;
View Full Code Here

Examples of com.woorea.openstack.keystone.model.authentication.UsernamePassword

    }
   
    public class Builder {
     
      public Authenticate withUsernamePassword(String username, String password) {
        Authentication authentication = new UsernamePassword(username, password);
        return new Authenticate(authentication);
      }
View Full Code Here

Examples of com.woorea.openstack.keystone.model.authentication.UsernamePassword

   * @param args
   */
  public static void main(String[] args) {
    Keystone keystone = new Keystone(ExamplesConfiguration.KEYSTONE_AUTH_URL);
    Access access = keystone.tokens()
        .authenticate(new UsernamePassword(ExamplesConfiguration.KEYSTONE_USERNAME, ExamplesConfiguration.KEYSTONE_PASSWORD))
        .withTenantName("admin")
        .execute();
   
    Ceilometer ceilometer = new Ceilometer(ExamplesConfiguration.CEILOMETER_ENDPOINT);
    ceilometer.setTokenProvider(new OpenStackSimpleTokenProvider(access.getToken().getId()));
View Full Code Here

Examples of com.woorea.openstack.keystone.model.authentication.UsernamePassword

import com.woorea.openstack.nova.model.Servers;

public class NovaStopStartServer {
  public static void main(String[] args) throws InterruptedException {
    Keystone keystone = new Keystone(ExamplesConfiguration.KEYSTONE_AUTH_URL);
    Access access = keystone.tokens().authenticate(new UsernamePassword(ExamplesConfiguration.KEYSTONE_USERNAME, ExamplesConfiguration.KEYSTONE_PASSWORD))
        .withTenantName(ExamplesConfiguration.TENANT_NAME)
        .execute();

    //use the token in the following requests
    keystone.token(access.getToken().getId());
View Full Code Here

Examples of com.woorea.openstack.keystone.model.authentication.UsernamePassword

        ExamplesConfiguration.KEYSTONE_AUTH_URL);
    // access with unscoped token
    Access access = keystone
        .tokens()
        .authenticate(
            new UsernamePassword(
                ExamplesConfiguration.KEYSTONE_USERNAME,
                ExamplesConfiguration.KEYSTONE_PASSWORD))
        .execute();
    // use the token in the following requests
    keystone.setTokenProvider(new OpenStackSimpleTokenProvider(access
View Full Code Here

Examples of com.woorea.openstack.keystone.model.authentication.UsernamePassword

   */
  public static void main(String[] args) {
    Keystone keystone = new Keystone(ExamplesConfiguration.KEYSTONE_AUTH_URL);
    //access with unscoped token
    Access access = keystone.tokens()
      .authenticate(new UsernamePassword(ExamplesConfiguration.KEYSTONE_USERNAME, ExamplesConfiguration.KEYSTONE_PASSWORD))
      .withTenantName("admin")
      .execute();

    User user = new User();
    user.setEmail("luis@woorea.es");
View Full Code Here

Examples of com.woorea.openstack.keystone.model.authentication.UsernamePassword

   * @param args
   */
  public static void main(String[] args) {
   
    Keystone keystone = new Keystone(ExamplesConfiguration.KEYSTONE_AUTH_URL);
    Access access = keystone.tokens().authenticate(new UsernamePassword(ExamplesConfiguration.KEYSTONE_USERNAME, ExamplesConfiguration.KEYSTONE_PASSWORD)).execute();
   
    //use the token in the following requests
    keystone.token(access.getToken().getId());
   
    Tenants tenants = keystone.tenants().list().execute();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.