3
0

AWSClientAuthPersistentCognitoIdentityProvider.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include <aws/identity-management/auth/PersistentCognitoIdentityProvider.h>
  10. namespace AWSClientAuth
  11. {
  12. //! Persistent Cognito Identity provider implementation that is shared with AWS Native SDK client.
  13. //! Use std::shared_ptr to create instance.
  14. class AWSClientAuthPersistentCognitoIdentityProvider
  15. : public Aws::Auth::PersistentCognitoIdentityProvider
  16. {
  17. public:
  18. AWSClientAuthPersistentCognitoIdentityProvider() = default;
  19. virtual ~AWSClientAuthPersistentCognitoIdentityProvider();
  20. // PersistentCognitoIdentityProvider Interface
  21. void Initialize(const Aws::String& awsAccountId, const Aws::String& identityPoolId);
  22. bool HasIdentityId() const override;
  23. bool HasLogins() const override;
  24. Aws::String GetIdentityId() const override;
  25. Aws::Map<Aws::String, Aws::Auth::LoginAccessTokens> GetLogins() override;
  26. Aws::String GetAccountId() const override;
  27. Aws::String GetIdentityPoolId() const override;
  28. void PersistIdentityId(const Aws::String&) override;
  29. void PersistLogins(const Aws::Map<Aws::String, Aws::Auth::LoginAccessTokens>&) override;
  30. void RemoveLogin(const Aws::String&);
  31. private:
  32. Aws::Map<Aws::String, Aws::Auth::LoginAccessTokens> m_logins;
  33. Aws::String m_identityId;
  34. Aws::String m_awsAccountId;
  35. Aws::String m_identityPoolId;
  36. };
  37. } // namespace AWSClientAuth