View Javadoc

1   /*
2    * Copyright (C) 2010 Atlassian
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package com.atlassian.jira.rest.client.api.domain;
18  
19  import java.net.URI;
20  
21  /**
22   * Information about current user "session" - or in case of the recommended stateless connection (really RESTful design)
23   * just the information about the user and the user login data.
24   *
25   * @since v0.1
26   */
27  public class Session {
28      private final URI userUri;
29      private final String username;
30      private final LoginInfo loginInfo;
31  
32      public Session(URI userUri, String username, LoginInfo loginInfo) {
33          this.userUri = userUri;
34          this.username = username;
35          this.loginInfo = loginInfo;
36      }
37  
38      public URI getUserUri() {
39          return userUri;
40      }
41  
42      public String getUsername() {
43          return username;
44      }
45  
46      public LoginInfo getLoginInfo() {
47          return loginInfo;
48      }
49  }