5c94d31d00d5e4920c365c99cd1d07b08280a83a
[so/libs.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *      http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  * ============LICENSE_END=========================================================
15  */
16
17 package com.woorea.openstack.keystone.model.authentication;
18
19 import org.codehaus.jackson.map.annotate.JsonRootName;
20
21 import com.woorea.openstack.keystone.model.Authentication;
22
23 @JsonRootName("auth")
24 public class UsernamePassword extends Authentication {
25     
26     public static final class PasswordCredentials {
27         
28         private String username;
29         
30         private String password;
31
32         /**
33          * @return the username
34          */
35         public String getUsername() {
36             return username;
37         }
38
39         /**
40          * @param username the username to set
41          */
42         public void setUsername(String username) {
43             this.username = username;
44         }
45
46         /**
47          * @return the password
48          */
49         public String getPassword() {
50             return password;
51         }
52
53         /**
54          * @param password the password to set
55          */
56         public void setPassword(String password) {
57             this.password = password;
58         }
59         
60     }
61     
62     private PasswordCredentials passwordCredentials = new PasswordCredentials();
63     
64     public UsernamePassword() {
65         
66     }
67     
68     public UsernamePassword(String username, String password) {
69         passwordCredentials.setUsername(username);
70         passwordCredentials.setPassword(password);
71     }
72
73     /**
74      * @return the passwordCredentials
75      */
76     public PasswordCredentials getPasswordCredentials() {
77         return passwordCredentials;
78     }
79
80     /**
81      * @param passwordCredentials the passwordCredentials to set
82      */
83     public void setPasswordCredentials(PasswordCredentials passwordCredentials) {
84         this.passwordCredentials = passwordCredentials;
85     }
86     
87 }