AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
LWAAuthorizationConfiguration.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. 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  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ACSDKAUTHORIZATION_LWA_LWAAUTHORIZATIONCONFIGURATION_H_
17 #define ACSDKAUTHORIZATION_LWA_LWAAUTHORIZATIONCONFIGURATION_H_
18 
19 #include <memory>
20 #include <string>
21 
24 
25 namespace alexaClientSDK {
26 namespace acsdkAuthorization {
27 namespace lwa {
28 
33 public:
42  static std::unique_ptr<LWAAuthorizationConfiguration> create(
44  const std::shared_ptr<avsCommon::utils::DeviceInfo>& deviceInfo,
45  const std::string& configRootKey = "");
46 
52  std::string getClientId() const;
53 
59  std::string getProductId() const;
60 
67 
73  std::chrono::seconds getRequestTimeout() const;
74 
80  std::chrono::seconds getAccessTokenRefreshHeadStart() const;
81 
87  std::string getLocale() const;
88 
95 
102 
109 
115  std::string getScopeData() const;
116 
123 
124 private:
133  bool init(
135  const std::shared_ptr<avsCommon::utils::DeviceInfo>& deviceInfo,
136  const std::string& configRootKey = "");
137 
143  bool initScopeData();
144 
146  std::shared_ptr<avsCommon::utils::DeviceInfo> m_deviceInfo;
147 
149  std::chrono::seconds m_requestTimeout;
150 
152  std::chrono::seconds m_accessTokenRefreshHeadStart;
153 
155  std::string m_locale;
156 
158  std::string m_requestCodePairUrl;
159 
161  std::string m_requestTokenUrl;
162 
164  std::string m_refreshTokenUrl;
165 
167  std::string m_scopeData;
168 };
169 
170 } // namespace lwa
171 } // namespace acsdkAuthorization
172 } // namespace alexaClientSDK
173 
174 #endif // ACSDKAUTHORIZATION_LWA_LWAAUTHORIZATIONCONFIGURATION_H_
static std::unique_ptr< LWAAuthorizationConfiguration > create(const avsCommon::utils::configuration::ConfigurationNode &configuration, const std::shared_ptr< avsCommon::utils::DeviceInfo > &deviceInfo, const std::string &configRootKey="")
::std::string string
Definition: gtest-port.h:1097
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0