AlexaClientSDK
1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <AuthObserver.h>
Public Member Functions | |
AuthObserver () | |
void | onAuthStateChange (const avsCommon::sdkInterfaces::AuthObserverInterface::State, const avsCommon::sdkInterfaces::AuthObserverInterface::Error=avsCommon::sdkInterfaces::AuthObserverInterface::Error::SUCCESS) override |
AuthObserverInterface::State | getAuthState () const |
bool | waitFor (const avsCommon::sdkInterfaces::AuthObserverInterface::State, const std::chrono::seconds=std::chrono::seconds(20)) |
Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::AuthObserverInterface | |
virtual | ~AuthObserverInterface ()=default |
Additional Inherited Members | |
Public Types inherited from alexaClientSDK::avsCommon::sdkInterfaces::AuthObserverInterface | |
enum | State { State::UNINITIALIZED, State::REFRESHED, State::EXPIRED, State::UNRECOVERABLE_ERROR, State::AUTHORIZING } |
The enum State describes the state of authorization. More... | |
enum | Error { Error::SUCCESS, Error::UNKNOWN_ERROR, Error::AUTHORIZATION_FAILED, Error::UNAUTHORIZED_CLIENT, Error::SERVER_ERROR, Error::INVALID_REQUEST, Error::INVALID_VALUE, Error::AUTHORIZATION_EXPIRED, Error::UNSUPPORTED_GRANT_TYPE, Error::INVALID_CODE_PAIR, Error::AUTHORIZATION_PENDING, Error::SLOW_DOWN, Error::INTERNAL_ERROR, Error::INVALID_CBL_CLIENT_ID } |
The enum Error encodes possible errors which may occur when changing state. More... | |
alexaClientSDK::integration::AuthObserver::AuthObserver | ( | ) |
AuthObserverInterface::State alexaClientSDK::integration::AuthObserver::getAuthState | ( | ) | const |
|
overridevirtual |
Notification that an authorization state has changed.
newState | The new state of the authorization token. |
error | The error associated to the state change. |
Implements alexaClientSDK::avsCommon::sdkInterfaces::AuthObserverInterface.
bool alexaClientSDK::integration::AuthObserver::waitFor | ( | const avsCommon::sdkInterfaces::AuthObserverInterface::State | authState, |
const std::chrono::seconds | duration = std::chrono::seconds(20) |
||
) |
AlexaClientSDK 1.26.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0