olp-cpp-sdk 1.24.0
Loading...
Searching...
No Matches
AppleSignInProperties.h
1/*
2 * Copyright (C) 2021 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 <olp/authentication/AuthenticationApi.h>
23
24namespace olp {
25namespace authentication {
26
30class AUTHENTICATION_API AppleSignInProperties {
31 public:
39 const std::string& GetAccessToken() const { return access_token_; }
40
48 void SetAccessToken(std::string access_token) {
49 access_token_ = std::move(access_token);
50 }
51
57 const std::string& GetFirstname() const { return firstname_; }
58
66 void SetFirstname(std::string firstname) {
67 firstname_ = std::move(firstname);
68 }
69
75 const std::string& GetLastname() const { return lastname_; }
76
84 void SetLastname(std::string lastname) { lastname_ = std::move(lastname); }
85
92 const std::string& GetCountryCode() const { return country_code_; }
93
102 void SetCountryCode(std::string country_code) {
103 country_code_ = std::move(country_code);
104 }
105
112 const std::string& GetLanguage() const { return language_; }
113
122 void SetLanguage(std::string language) { language_ = std::move(language); }
123
129 const std::string& GetClientId() const { return client_id_; }
130
136 void SetClientId(std::string client_id) { client_id_ = std::move(client_id); }
137
144 const std::string& GetRealm() const { return realm_; }
145
152 void SetRealm(std::string realm) { realm_ = std::move(realm); }
153
154 private:
155 std::string access_token_;
156 std::string firstname_;
157 std::string lastname_;
158 std::string country_code_;
159 std::string language_;
160 std::string client_id_;
161 std::string realm_;
162};
163
164} // namespace authentication
165} // namespace olp
The Apple sign-in properties.
Definition AppleSignInProperties.h:30
void SetFirstname(std::string firstname)
Sets the first name of the user.
Definition AppleSignInProperties.h:66
const std::string & GetCountryCode() const
Gets the code of the user's country in the ISO 3166-1 alpha-3 format.
Definition AppleSignInProperties.h:92
void SetCountryCode(std::string country_code)
Sets the code of the user's country in the ISO 3166-1 alpha-3 format.
Definition AppleSignInProperties.h:102
const std::string & GetLanguage() const
Gets the code of the user's language in the ISO 639-1 alpha-2 format.
Definition AppleSignInProperties.h:112
void SetRealm(std::string realm)
Sets the platform realm to which the application ID (client_id) belongs.
Definition AppleSignInProperties.h:152
const std::string & GetRealm() const
Gets the platform realm to which the application ID (client_id) belongs.
Definition AppleSignInProperties.h:144
const std::string & GetFirstname() const
Gets the first name of the user.
Definition AppleSignInProperties.h:57
void SetLanguage(std::string language)
Sets the code of the user's language in the ISO 639-1 alpha-2 format.
Definition AppleSignInProperties.h:122
const std::string & GetClientId() const
Gets the application ID.
Definition AppleSignInProperties.h:129
const std::string & GetLastname() const
Gets the last name of the user.
Definition AppleSignInProperties.h:75
const std::string & GetAccessToken() const
Gets the bearer in the authorization request header.
Definition AppleSignInProperties.h:39
void SetClientId(std::string client_id)
Sets the application ID.
Definition AppleSignInProperties.h:136
void SetAccessToken(std::string access_token)
Sets the bearer in the authorization request header.
Definition AppleSignInProperties.h:48
void SetLastname(std::string lastname)
Sets the last name of the user.
Definition AppleSignInProperties.h:84
Rules all the other namespaces.
Definition AppleSignInProperties.h:24