[MSO-8] Update the maven dependency
[so.git] / adapters / mso-adapter-utils / src / main / java / org / openecomp / mso / cloud / authentication / models / RackspaceAuthentication.java
1 /*
2  * ============LICENSE_START==========================================
3  * ===================================================================
4  * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
5  * ===================================================================
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *        http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  * ============LICENSE_END============================================
18  *
19  * ECOMP and OpenECOMP are trademarks
20  * and service marks of AT&T Intellectual Property.
21  *
22  */
23
24 package org.openecomp.mso.cloud.authentication.models;
25
26 import org.codehaus.jackson.annotate.JsonIgnore;
27 import org.codehaus.jackson.annotate.JsonProperty;
28 import org.codehaus.jackson.map.annotate.JsonRootName;
29 import com.woorea.openstack.keystone.model.Authentication;
30
31 @JsonRootName("auth")
32 public class RackspaceAuthentication extends Authentication {
33                 
34         /**
35          * 
36          */
37         private static final long serialVersionUID = 5451283386875662918L;
38
39         @JsonIgnore
40         private String tenantId;
41         
42         @JsonIgnore
43         private String tenantName;
44         
45         public static final class Token {
46                 
47                 private String username;
48                 private String apiKey;
49
50                 /**
51                  * @return the username
52                  */
53                 public String getUsername() {
54                         return username;
55                 }
56                 /**
57                  * @param username the username to set
58                  */
59                 public void setUsername(String username) {
60                         this.username = username;
61                 }
62                 /**
63                  * @return the apiKey
64                  */
65                 public String getApiKey() {
66                         return apiKey;
67                 }
68                 /**
69                  * @param apiKey the apiKey to set
70                  */
71                 public void setApiKey(String apiKey) {
72                         this.apiKey = apiKey;
73                 }
74         }
75         
76         @JsonProperty("RAX-KSKEY:apiKeyCredentials")
77         private Token token = new Token();
78         
79         public RackspaceAuthentication (String username, String apiKey) {
80                 this.token.username = username;
81                 this.token.apiKey = apiKey;
82         
83         }
84
85         /**
86          * @return the token
87          */
88         public Token getToken() {
89                 return token;
90         }
91
92         /**
93          * @param token the token to set
94          */
95         public void setToken(Token token) {
96                 this.token = token;
97         }
98         
99 }