Package org.jboss.resteasy.keystone.model

Examples of org.jboss.resteasy.keystone.model.Authentication


   }


   public  Access obtainToken(String projectName)
   {
      Authentication auth = authentication(projectName);
      return tokenFactory.create(auth);
   }
View Full Code Here


      return tokenFactory.create(auth);
   }

   public String obtainSignedToken(String projectName)
   {
      Authentication auth = authentication(projectName);
      return tokenFactory.createSigned(auth);

   }
View Full Code Here

   }

   public Authentication authentication(String projectName)
   {
      Authentication auth = new Authentication();
      Authentication.PasswordCredentials creds = new Authentication.PasswordCredentials();
      creds.setUsername(username);
      creds.setPassword(password);
      auth.setProjectName(projectName);
      auth.setPasswordCredentials(creds);
      return auth;
   }
View Full Code Here

   }

   @Test
   public void testCMD() throws Exception
   {
      Authentication auth = new SkeletonKeyClientBuilder().username("wburke").password("geheim").authentication("Skeleton Key");
      ResteasyClient client = new ResteasyClientBuilder().build();
      WebTarget target = client.target(generateBaseUrl());
      Mappers.registerContextResolver(client);
      String tiny = target.path("tokens").path("url").request().post(Entity.json(auth), String.class);
      System.out.println(tiny);
View Full Code Here

TOP

Related Classes of org.jboss.resteasy.keystone.model.Authentication

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.