Package com.atlassian.jira.rest.client.api.domain

Examples of com.atlassian.jira.rest.client.api.domain.Authentication


  @Override
  public Authentication parse(JSONObject json) throws JSONException {
    final SessionCookie sessionCookie = sessionCookieJsonParser.parse(json.getJSONObject("session"));
    final LoginInfo loginInfo = loginInfoJsonParser.parse(json.getJSONObject("loginInfo"));
    return new Authentication(loginInfo, sessionCookie);
  }
View Full Code Here


public class AuthenticationJsonParserTest {
  @Test
  public void testParse() throws Exception {
    final AuthenticationJsonParser parser = new AuthenticationJsonParser();
    final Authentication authentication = parser.parse(ResourceUtil
        .getJsonObjectFromResource("/json/authentication/valid.json"));
    Assert.assertEquals(new Authentication(new LoginInfo(54, 23, toDateTime("2010-09-13T17:19:20.752+0300"),
        toDateTime("2010-09-13T17:19:38.220+0900")), new SessionCookie("JSESSIONID", "E5BD072ABEE0082DE4D6C8C2B6D96B79")), authentication);
  }
View Full Code Here

TOP

Related Classes of com.atlassian.jira.rest.client.api.domain.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.