AlexaClientSDK  1.21.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Types | Public Member Functions | List of all members
alexaClientSDK::avsCommon::sdkInterfaces::AuthObserverInterface Class Referenceabstract

#include <AuthObserverInterface.h>

Inheritance diagram for alexaClientSDK::avsCommon::sdkInterfaces::AuthObserverInterface:
Inheritance graph
[legend]

Public Types

enum  State { State::UNINITIALIZED, State::REFRESHED, State::EXPIRED, State::UNRECOVERABLE_ERROR }
 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...
 

Public Member Functions

virtual ~AuthObserverInterface ()=default
 
virtual void onAuthStateChange (State newState, Error error)=0
 

Detailed Description

This interface is used to observe changes to the state of authorization.

Member Enumeration Documentation

◆ Error

The enum Error encodes possible errors which may occur when changing state.

Enumerator
SUCCESS 

Success.

UNKNOWN_ERROR 

An unknown body containing no error field has been encountered.

AUTHORIZATION_FAILED 

The client authorization failed.

UNAUTHORIZED_CLIENT 

The client is not authorized to use authorization codes.

SERVER_ERROR 

The server encountered a runtime error.

INVALID_REQUEST 

The request is missing a required parameter, has an invalid value, or is otherwise improperly formed.

INVALID_VALUE 

One of the values in the request was invalid.

AUTHORIZATION_EXPIRED 

The authorization code is invalid, expired, revoked, or was issued to a different client.

UNSUPPORTED_GRANT_TYPE 

The client specified the wrong token type.

INVALID_CODE_PAIR 

Invalid code pair provided in Code-based linking token request.

AUTHORIZATION_PENDING 

Waiting for user to authorize the specified code pair.

SLOW_DOWN 

Client should slow down in the rate of requests polling for an access token.

INTERNAL_ERROR 

Internal error in client code.

INVALID_CBL_CLIENT_ID 

Client ID not valid for use with code based linking.

◆ State

The enum State describes the state of authorization.

Enumerator
UNINITIALIZED 

Authorization not yet acquired.

REFRESHED 

Authorization has been refreshed.

EXPIRED 

Authorization has expired.

UNRECOVERABLE_ERROR 

Authorization failed in a manner that cannot be corrected by retry.

Constructor & Destructor Documentation

◆ ~AuthObserverInterface()

virtual alexaClientSDK::avsCommon::sdkInterfaces::AuthObserverInterface::~AuthObserverInterface ( )
virtualdefault

Virtual destructor to assure proper cleanup of derived types.

Member Function Documentation

◆ onAuthStateChange()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::AuthObserverInterface::onAuthStateChange ( State  newState,
Error  error 
)
pure virtual

Notification that an authorization state has changed.

Note
Implementations of this method must not call AuthDelegate methods because the AuthDelegate may be in a 'locked' state at the time this call is made.
Parameters
newStateThe new state of the authorization token.
errorThe error associated to the state change.

Implemented in alexaClientSDK::acl::HTTP2Transport, alexaClientSDK::sampleApp::UIManager, alexaClientSDK::capabilitiesDelegate::DiscoveryEventSender, alexaClientSDK::diagnostics::DevicePropertyAggregator, and alexaClientSDK::integration::AuthObserver.


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

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