Package org.jclouds.openstack.domain

Examples of org.jclouds.openstack.domain.AuthenticationResponse


      HttpResponse response = HttpResponse.builder().statusCode(204).message("No Content")
                                          .addHeader("X-Auth-Token", "token")
                                          .addHeader("X-Storage-Token", "token")
                                          .addHeader("X-Storage-Url", "http://127.0.0.1:8080/v1/token").build();

      AuthenticationResponse md = parser.apply(response);
      assertEquals(md, new AuthenticationResponse("token", ImmutableMap.<String, URI> of("X-Storage-Url",
               URI.create("http://fooman:8080/v1/token"))));
   }
View Full Code Here


      HttpResponse response = HttpResponse.builder().statusCode(204).message("No Content")
              .addHeader("x-auth-token", "token")
              .addHeader("x-storage-token", "token")
              .addHeader("x-storage-url", "http://127.0.0.1:8080/v1/token").build();
      AuthenticationResponse md = parser.apply(response);
      assertEquals(md, new AuthenticationResponse("token", ImmutableMap.<String, URI> of("x-storage-url",
              URI.create("http://fooman:8080/v1/token"))));
   }
View Full Code Here

                                          .addHeader("X-Storage-Url", "http://127.0.0.1:8080/v1/token")
                                          .addHeader("X-CDN-Management-Url", "http://127.0.0.1:8080/cdn-mgmt")
                                          .addHeader("X-Server-Management-Url", "http://127.0.0.1:8080/srv-mgmt")
                                          .build();

      AuthenticationResponse md = parser.apply(response);
      assertEquals(md.getAuthToken(), "token");
      assertEquals(md.getServices().get(AuthHeaders.STORAGE_URL), URI.create("http://fooman:8080/v1/token"));
      assertEquals(md.getServices().get(AuthHeaders.CDN_MANAGEMENT_URL), URI.create("http://fooman:8080/cdn-mgmt"));
      assertEquals(md.getServices().get(AuthHeaders.SERVER_MANAGEMENT_URL), URI.create("http://fooman:8080/srv-mgmt"));
   }
View Full Code Here

              .addHeader("x-storage-token", "token")
              .addHeader("x-storage-url", "http://127.0.0.1:8080/v1/token")
              .addHeader("x-cdn-management-url", "http://127.0.0.1:8080/cdn-mgmt")
              .addHeader("x-server-management-url", "http://127.0.0.1:8080/srv-mgmt")
              .build();
      AuthenticationResponse md = parser.apply(response);
      assertEquals(md.getAuthToken(), "token");
      assertEquals(md.getServices().get(AuthHeaders.STORAGE_URL), URI.create("http://fooman:8080/v1/token"));
      assertEquals(md.getServices().get(AuthHeaders.CDN_MANAGEMENT_URL), URI.create("http://fooman:8080/cdn-mgmt"));
      assertEquals(md.getServices().get(AuthHeaders.SERVER_MANAGEMENT_URL), URI.create("http://fooman:8080/srv-mgmt"));
   }
View Full Code Here

         super(null);
      }

      @Override
      public AuthenticationResponse load(Credentials input) {
         return new AuthenticationResponse("authToken", ImmutableMap.<String, URI> of(
                  AuthHeaders.SERVER_MANAGEMENT_URL, URI.create("http://endpoint/vapi-version"),
                  AuthHeaders.STORAGE_URL, URI.create("http://storage")));
      }
View Full Code Here

            builder.put(AuthHeaders.SERVER_MANAGEMENT_URL, getURI(entry.getValue()));
         } else if (header.equalsIgnoreCase(AuthHeaders.CDN_MANAGEMENT_URL)) {
            builder.put(AuthHeaders.CDN_MANAGEMENT_URL, getURI(entry.getValue()));
         }
      }
      AuthenticationResponse response = new AuthenticationResponse(checkNotNull(from.getFirstHeaderOrNull(AUTH_TOKEN),
               AUTH_TOKEN), builder.build());
      logger.debug("will connect to: ", response);
      return response;
   }
View Full Code Here

TOP

Related Classes of org.jclouds.openstack.domain.AuthenticationResponse

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.