3
0

AWSCredentialManager.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 <AzCore/std/smart_ptr/unique_ptr.h>
  10. #include <Credential/AWSCVarCredentialHandler.h>
  11. #include <Credential/AWSDefaultCredentialHandler.h>
  12. namespace AWSCore
  13. {
  14. //! AWSCredentialManager is the manager to control the lifecycle of
  15. //! AWSCore Gem credential handlers
  16. class AWSCredentialManager
  17. {
  18. public:
  19. AWSCredentialManager();
  20. ~AWSCredentialManager() = default;
  21. //! Activate manager and its credential handlers, make sure activation
  22. //! invoked after AWSNativeSDK init to avoid memory leak
  23. void ActivateManager();
  24. //! Deactivate manager and its credential handlers, make sure deactivation
  25. //! invoked before AWSNativeSDK shutdown to avoid memory leak
  26. void DeactivateManager();
  27. private:
  28. AZStd::unique_ptr<AWSCVarCredentialHandler> m_cvarCredentialHandler;
  29. AZStd::unique_ptr<AWSDefaultCredentialHandler> m_defaultCredentialHandler;
  30. };
  31. } // namespace AWSCore