Examples of UsernamePassword


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))
        .execute();
    // use the token in the following requests
    keystone.setTokenProvider(new OpenStackSimpleTokenProvider(access.getToken().getId()));

    Tenants tenants = keystone.tenants().list().execute();
View Full Code Here

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

   */
  public static void main(String[] args) throws Exception {
    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))
        .execute();
   
    //use the token in the following requests
    keystone.setTokenProvider(new OpenStackSimpleTokenProvider(access.getToken().getId()));
   
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))
        .execute();

    access = keystone.tokens().authenticate(new TokenAuthentication(access.getToken().getId())).withTenantName("admin").execute();

    Tenant tenant = new Tenant();
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("demo")
        .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

   */
  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))
        .execute();
    // use the token in the following requests
    keystone.setTokenProvider(new OpenStackSimpleTokenProvider(access.getToken().getId()));

    Tenants tenants = keystone.tenants().list().execute();
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());
   
View Full Code Here

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

  }

  private String obtainFilterToken() {
    Keystone keystone = new Keystone(props.getKeystoneHost() + ':'
        + props.getKeystonePort() + '/' + props.getOAuthVersion());
    Authentication authentication = new UsernamePassword(
        props.getKeystoneProxyUser(), props.getKeystoneProxyPass());

    Access access = keystone.tokens().authenticate(authentication)
        .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.