1c07283c77d99ba33babc430dec9a776e7b4ac65
[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 com.fasterxml.jackson.annotation.JsonRootName;
20 import com.woorea.openstack.keystone.model.Authentication;
21
22 @JsonRootName("auth")
23 public class UsernamePassword extends Authentication {
24     
25     public static final class PasswordCredentials {
26         
27         private String username;
28         
29         private String password;
30
31         /**
32          * @return the username
33          */
34         public String getUsername() {
35             return username;
36         }
37
38         /**
39          * @param username the username to set
40          */
41         public void setUsername(String username) {
42             this.username = username;
43         }
44
45         /**
46          * @return the password
47          */
48         public String getPassword() {
49             return password;
50         }
51
52         /**
53          * @param password the password to set
54          */
55         public void setPassword(String password) {
56             this.password = password;
57         }
58         
59     }
60     
61     private PasswordCredentials passwordCredentials = new PasswordCredentials();
62     
63     public UsernamePassword() {
64         
65     }
66     
67     public UsernamePassword(String username, String password) {
68         passwordCredentials.setUsername(username);
69         passwordCredentials.setPassword(password);
70     }
71
72     /**
73      * @return the passwordCredentials
74      */
75     public PasswordCredentials getPasswordCredentials() {
76         return passwordCredentials;
77     }
78
79     /**
80      * @param passwordCredentials the passwordCredentials to set
81      */
82     public void setPasswordCredentials(PasswordCredentials passwordCredentials) {
83         this.passwordCredentials = passwordCredentials;
84     }
85     
86 }