![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <AuthorizationAdapterInterface.h>
Public Member Functions | |
virtual | ~AuthorizationAdapterInterface ()=default |
Destructor. More... | |
virtual std::string | getAuthToken ()=0 |
virtual void | reset ()=0 |
virtual void | onAuthFailure (const std::string &authToken)=0 |
virtual avsCommon::sdkInterfaces::AuthObserverInterface::FullState | getState ()=0 |
virtual std::shared_ptr< AuthorizationInterface > | getAuthorizationInterface ()=0 |
virtual avsCommon::sdkInterfaces::AuthObserverInterface::FullState | onAuthorizationManagerReady (const std::shared_ptr< AuthorizationManagerInterface > &manager)=0 |
The AuthorizationAdapterInterface
is an abstraction for an authorization mechanism. This interface will be used for the AuthorizationManagerInterface
to communicate. The application will not need to call these methods directly. The class provides methods to query the current state and token information. Additionally, control methods are provided to instruct the object when to reset().
The other side of this communication happens using the AuthorizationManagerInterface::reportStateChange()
method. Once the manager is ready to receive messages, expect the AuthorizationManagerInterface::onManagerReady()
callback. This will pass an instance of the manager that is to be used for further interactions.
|
virtualdefault |
Destructor.
|
pure virtual |
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. Implemented in alexaClientSDK::acsdkAuthorization::lwa::LWAAuthorizationAdapter.
|
pure virtual |
Returns the auth token if authorized, otherwise returns an empty string.
Implemented in alexaClientSDK::acsdkAuthorization::lwa::LWAAuthorizationAdapter.
|
pure virtual |
Returns the current state of the AuthorizationAdapterInterface
.
Implemented in alexaClientSDK::acsdkAuthorization::lwa::LWAAuthorizationAdapter.
|
pure virtual |
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.
Implemented in alexaClientSDK::acsdkAuthorization::lwa::LWAAuthorizationAdapter.
|
pure virtual |
Sets the AuthorizationManagerInterface
and communicates to the adapter the manager is now ready to receive messages. Adapters must ensure that no AuthorizationManagerInterface
calls are made in this callback as the implementation makes no guarantee about re-entrancy.
AuthorizationManagerInterface | manager |
|
pure virtual |
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.
Implemented in alexaClientSDK::acsdkAuthorization::lwa::LWAAuthorizationAdapter.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0