olp-cpp-sdk  1.22.0
Settings.h
1 /*
2  * Copyright (C) 2019-2024 HERE Europe B.V.
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  * SPDX-License-Identifier: Apache-2.0
17  * License-Filename: LICENSE
18  */
19 
20 #pragma once
21 
22 #include <boost/optional.hpp>
23 #include <memory>
24 #include <string>
25 
26 #include <olp/core/client/RetrySettings.h>
27 #include <olp/core/http/NetworkProxySettings.h>
28 
29 #include "AuthenticationApi.h"
30 #include "AuthenticationCredentials.h"
31 
32 namespace olp {
33 namespace http {
34 class Network;
35 }
36 
37 namespace thread {
38 class TaskScheduler;
39 }
40 
41 namespace authentication {
42 static const std::string kHereAccountProductionTokenUrl =
43  "https://account.api.here.com/oauth2/token";
44 
50 struct AUTHENTICATION_API Settings {
56  explicit Settings(AuthenticationCredentials credentials);
57 
64 
69  std::shared_ptr<http::Network> network_request_handler;
70 
75  std::shared_ptr<thread::TaskScheduler> task_scheduler;
76 
80  boost::optional<http::NetworkProxySettings> network_proxy_settings;
81 
88  std::string token_endpoint_url;
89 
100  bool use_system_time{true};
101 
107 
111  boost::optional<std::string> scope;
112 };
113 
114 } // namespace authentication
115 } // namespace olp
The access key ID and access key secret that you got from the HERE Account as a part of the onboardin...
Definition: AuthenticationCredentials.h:45
Rules all the other namespaces.
Definition: AppleSignInProperties.h:24
Configures the TokenEndpoint instance.
Definition: Settings.h:50
boost::optional< std::string > scope
(Optional) The scope to be assigned to an access token requests.
Definition: Settings.h:111
std::shared_ptr< thread::TaskScheduler > task_scheduler
(Optional) The TaskScheduler class that is used to manage the callbacks enqueue.
Definition: Settings.h:75
std::shared_ptr< http::Network > network_request_handler
The network instance that is used to internally operate with the HERE platform Services.
Definition: Settings.h:69
Settings(AuthenticationCredentials credentials)
Creates the Settings instance.
std::string token_endpoint_url
(Optional) The server URL of the token endpoint.
Definition: Settings.h:88
client::RetrySettings retry_settings
A collection of settings that controls how failed requests should be treated.
Definition: Settings.h:106
boost::optional< http::NetworkProxySettings > network_proxy_settings
(Optional) The configuration settings for the network layer.
Definition: Settings.h:80
AuthenticationCredentials credentials
The access key ID and access key secret that you got from the HERE Account as a part of the onboardin...
Definition: Settings.h:63
A collection of settings that controls how failed requests should be treated by the Data SDK.
Definition: RetrySettings.h:47