AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <LWAAuthorizationAdapter.h>
Static Public Member Functions | |
static std::shared_ptr< LWAAuthorizationAdapter > | create (const std::shared_ptr< avsCommon::utils::configuration::ConfigurationNode > &configuration, std::unique_ptr< avsCommon::utils::libcurlUtils::HttpPostInterface > httpPost, const std::shared_ptr< avsCommon::utils::DeviceInfo > &deviceInfo, const std::shared_ptr< acsdkAuthorizationInterfaces::lwa::LWAAuthorizationStorageInterface > &storage, std::unique_ptr< avsCommon::utils::libcurlUtils::HttpGetInterface > httpGet=nullptr, const std::string &adapterId="") |
This class provides functionality for the application to authorize using LWA methods.
The class does not currently support reauthorization. If authorization has occurred, then the application should call logout before authorizing.
LWAAuthorizationInterface
for more details. alexaClientSDK::acsdkAuthorization::lwa::LWAAuthorizationAdapter::~LWAAuthorizationAdapter | ( | ) |
Destructor.
|
override |
|
override |
|
static |
Creates an instance of LWAAuthorizationAdapter.
configuration | The configuration node. |
httpPost | An object for making HTTPPost requests. |
deviceInfo | Device info. |
storage | Persisted storage. |
httpGet | An object for making HTTPGet requests. |
adapterId | Allows for specifying an alternate adapterId to the default. |
|
overridevirtual |
Returns the associated application facing AuthorizationInterface
. This must never return null, as it is used by AuthorizationManagerInterface
to further retrieve the unique identifier for the AuthorizationAdapterInterface
instance.
AuthorizationInterface
instance. Implements alexaClientSDK::acsdkAuthorizationInterfaces::AuthorizationAdapterInterface.
|
overridevirtual |
Returns the auth token if authorized, otherwise returns an empty string.
Implements alexaClientSDK::acsdkAuthorizationInterfaces::AuthorizationAdapterInterface.
|
overridevirtual |
Returns a unique identifier used to identify this adapter.
Implements alexaClientSDK::acsdkAuthorizationInterfaces::AuthorizationInterface.
|
overridevirtual |
Returns the current state of the AuthorizationAdapterInterface
.
Implements alexaClientSDK::acsdkAuthorizationInterfaces::AuthorizationAdapterInterface.
|
overridevirtual |
Indicates if the authToken returned in AuthorizationAdapterInterface::getAuthToken()
is invalid. If the adapter is authorized, this should cause a reportStateChange() call (please refer to function documentation for further details), and attempt to obtain a valid access token.
If the adapter is not authorized, this call should be ignored.
Implements alexaClientSDK::acsdkAuthorizationInterfaces::AuthorizationAdapterInterface.
|
override |
|
overridevirtual |
Logs out and clears the data within this adapter. This should not initiate a device wide deregistration, that will be handled by the AuthorizationOrchestratorInterface
. If this is called, the adapter must stop any ongoing authorization.
Implements alexaClientSDK::acsdkAuthorizationInterfaces::AuthorizationAdapterInterface.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0