Examples of TokenResponse


Examples of org.iplantc.agave.client.model.TokenResponse

  public void exportCache()
  {
    try
    {
      TokenApi api = new TokenApi();
      TokenResponse response = api.createAuthToken(Settings.API_USERNAME, Settings.API_PASSWORD, Settings.API_CLIENT_KEY, Settings.API_CLIENT_SECRET);
      Assert.assertNotNull(response, "Null response from API");
      AccessToken token = response.getResult();
      Assert.assertNotNull(token, "Null token from API");
      Assert.assertFalse(StringUtils.isEmpty(token.getAccessToken()), "Null access token string from API");
      Assert.assertFalse(StringUtils.isEmpty(token.getRefreshToken()), "Null refresh token string from API");
      Assert.assertTrue(token.getCreatedAt().isBeforeNow(), "Token creation time was not in the past.");
      Assert.assertTrue(token.getExpiresAt().isAfterNow(), "Token creation time was not in the past.");
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.