1 /*
2 * Copyright 2009-2017 Alibaba Cloud All rights reserved.
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 #include <alibabacloud/oss/auth/Credentials.h>
18
19 using namespace AlibabaCloud::OSS;
20
Credentials(const std::string & accessKeyId,const std::string & accessKeySecret,const std::string & sessionToken)21 Credentials::Credentials(const std::string &accessKeyId,
22 const std::string &accessKeySecret,
23 const std::string &sessionToken) :
24 accessKeyId_(accessKeyId),
25 accessKeySecret_(accessKeySecret),
26 sessionToken_(sessionToken)
27 {
28 }
29
~Credentials()30 Credentials::~Credentials()
31 {
32 }
33
AccessKeyId() const34 const std::string& Credentials::AccessKeyId () const
35 {
36 return accessKeyId_;
37 }
38
AccessKeySecret() const39 const std::string& Credentials::AccessKeySecret () const
40 {
41 return accessKeySecret_;
42 }
43
SessionToken() const44 const std::string& Credentials::SessionToken () const
45 {
46 return sessionToken_;
47 }
48
setAccessKeyId(const std::string & accessKeyId)49 void Credentials::setAccessKeyId(const std::string &accessKeyId)
50 {
51 accessKeyId_ = accessKeyId;
52 }
53
setAccessKeySecret(const std::string & accessKeySecret)54 void Credentials::setAccessKeySecret(const std::string &accessKeySecret)
55 {
56 accessKeySecret_ = accessKeySecret;
57 }
58
setSessionToken(const std::string & sessionToken)59 void Credentials::setSessionToken (const std::string &sessionToken)
60 {
61 sessionToken_ = sessionToken;
62 }
63
64