olp-cpp-sdk 1.24.0
Loading...
Searching...
No Matches
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 <memory>
23#include <string>
24
25#include <olp/core/client/RetrySettings.h>
26#include <olp/core/http/NetworkProxySettings.h>
27#include <olp/core/porting/optional.h>
28#include "AuthenticationApi.h"
29#include "AuthenticationCredentials.h"
30
31namespace olp {
32namespace http {
33class Network;
34}
35
36namespace thread {
37class TaskScheduler;
38}
39
40namespace authentication {
41static const std::string kHereAccountProductionTokenUrl =
42 "https://account.api.here.com/oauth2/token";
43
49struct AUTHENTICATION_API Settings {
55 explicit Settings(AuthenticationCredentials credentials);
56
63
68 std::shared_ptr<http::Network> network_request_handler;
69
74 std::shared_ptr<thread::TaskScheduler> task_scheduler;
75
79 porting::optional<http::NetworkProxySettings> network_proxy_settings;
80
87 std::string token_endpoint_url;
88
99 bool use_system_time{true};
100
106
110 porting::optional<std::string> scope;
111};
112
113} // namespace authentication
114} // 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:49
porting::optional< std::string > scope
(Optional) The scope to be assigned to an access token requests.
Definition Settings.h:110
std::shared_ptr< thread::TaskScheduler > task_scheduler
(Optional) The TaskScheduler class that is used to manage the callbacks enqueue.
Definition Settings.h:74
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:68
Settings(AuthenticationCredentials credentials)
Creates the Settings instance.
std::string token_endpoint_url
(Optional) The server URL of the token endpoint.
Definition Settings.h:87
client::RetrySettings retry_settings
A collection of settings that controls how failed requests should be treated.
Definition Settings.h:105
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:62
porting::optional< http::NetworkProxySettings > network_proxy_settings
(Optional) The configuration settings for the network layer.
Definition Settings.h:79
A collection of settings that controls how failed requests should be treated by the Data SDK.
Definition RetrySettings.h:47