AlexaClientSDK  1.25.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | Static Public Member Functions | List of all members
alexaClientSDK::avsGatewayManager::AuthRefreshedObserver Class Reference

#include <AuthRefreshedObserver.h>

Inheritance diagram for alexaClientSDK::avsGatewayManager::AuthRefreshedObserver:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::avsGatewayManager::AuthRefreshedObserver:
Collaboration graph
[legend]

Public Member Functions

void onAuthStateChange (State newState, Error error) override
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::AuthObserverInterface
virtual ~AuthObserverInterface ()=default
 

Static Public Member Functions

static std::shared_ptr< AuthRefreshedObservercreate (std::function< void()> callback)
 

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...
 

Detailed Description

Observe Authorization status to call the callback function once the status is refreshed.

Member Function Documentation

◆ create()

shared_ptr< AuthRefreshedObserver > alexaClientSDK::avsGatewayManager::AuthRefreshedObserver::create ( std::function< void()>  callback)
static

Creates a new instance of AuthRefreshedObserver.

Parameters
callbackcallback function to be called once authorization is refreshed
Returns
a new instance of the AuthRefreshedObserver.

◆ onAuthStateChange()

void AuthRefreshedObserver::onAuthStateChange ( State  newState,
Error  error 
)
overridevirtual

Method called with the new Authorization state

Parameters
newStatenew state
errorNot necessarily an error, but a description of the result of the operation which can also be success.

Implements alexaClientSDK::avsCommon::sdkInterfaces::AuthObserverInterface.


The documentation for this class was generated from the following files:

AlexaClientSDK 1.25.0 - Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0