// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 #pragma once // Standard Library #include // AWS SDK #include #include #include #include #include #include // GameKit #include #include #include #include #include // Boost #include namespace GameKit { namespace Identity { class FacebookIdentityProvider : public IFederatedIdentityProvider { private: FuncLogCallback m_logCb; std::map m_clientSettings; std::shared_ptr m_httpClient; std::shared_ptr makeRequest(const std::string& path, Aws::Http::HttpMethod method, const std::string& payload); public: FacebookIdentityProvider() : m_logCb(nullptr) {} FacebookIdentityProvider(std::map& clientSettings, FuncLogCallback logCb); FacebookIdentityProvider(std::map& clientSettings, const std::shared_ptr httpClient, FuncLogCallback logCb); ~FacebookIdentityProvider(); LoginUrlResponseInternal GetLoginUrl() override; unsigned int PollForCompletion(const std::string& requestId, int timeout, std::string& encryptedLocation) override; unsigned int RetrieveTokens(const std::string& location, std::string& tokens) override; }; } }