You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
o3de/Gems/AWSCore/Code/Source/Credential/AWSCredentialManager.h

39 lines
1.2 KiB
C++

/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <AzCore/std/smart_ptr/unique_ptr.h>
#include <Credential/AWSCVarCredentialHandler.h>
#include <Credential/AWSDefaultCredentialHandler.h>
namespace AWSCore
{
//! AWSCredentialManager is the manager to control the lifecycle of
//! AWSCore Gem credential handlers
class AWSCredentialManager
{
public:
AWSCredentialManager();
~AWSCredentialManager() = default;
//! Activate manager and its credential handlers, make sure activation
//! invoked after AWSNativeSDK init to avoid memory leak
void ActivateManager();
//! Deactivate manager and its credential handlers, make sure deactivation
//! invoked before AWSNativeSDK shutdown to avoid memory leak
void DeactivateManager();
private:
AZStd::unique_ptr<AWSCVarCredentialHandler> m_cvarCredentialHandler;
AZStd::unique_ptr<AWSDefaultCredentialHandler> m_defaultCredentialHandler;
};
} // namespace AWSCore