Alexa Auto SDK  2.3.0
Public Types | Public Member Functions | List of all members
aace::alexa::AuthProvider Class Referenceabstract

Public Types

using AuthState = aace::alexa::AuthProviderEngineInterface::AuthState
 
using AuthError = aace::alexa::AuthProviderEngineInterface::AuthError
 

Public Member Functions

virtual std::string getAuthToken ()=0
 
virtual AuthState getAuthState ()=0
 
virtual void authFailure (const std::string &token)
 
void authStateChanged (AuthState authState, AuthError authError)
 

Detailed Description

AuthProvider should be extended to manage access tokens for AVS authorization and report client authorization state to the Engine.

Member Typedef Documentation

◆ AuthState

Describes the state of client authorization with AVS

See also
aace::alexa::AuthProviderEngineInterface::AuthState

◆ AuthError

Describes an error during an attempt to authorize with AVS

See also
aace::alexa::AuthProviderEngineInterface::AuthError

Member Function Documentation

◆ getAuthToken()

virtual std::string aace::alexa::AuthProvider::getAuthToken ( )
pure virtual

Returns the token used by the platform implementation for authorization with AVS. The platform implementation should retrieve an auth token if it does not have one.

Returns
The token used to authorize with AVS

◆ getAuthState()

virtual AuthState aace::alexa::AuthProvider::getAuthState ( )
pure virtual

Returns the AVS authorization state of the platform implementation

Returns
The AVS authorization state

◆ authFailure()

virtual void aace::alexa::AuthProvider::authFailure ( const std::string &  token)
inlinevirtual

Notifies the platform implementation that the specified access token was used in an unauthorized request to AVS. AVS responded to this request with a 403 code indicating the token was not valid.

Parameters
[in]tokenThe access token used in an unauthorized request to AVS

◆ authStateChanged()

void aace::alexa::AuthProvider::authStateChanged ( AuthState  authState,
AuthError  authError 
)

Notifies the Engine of a change in AVS authorization state in the platform implementation

Parameters
[in]authStateThe new authorization state
[in]authErrorThe error state of the authorization attempt

Alexa Auto SDK 2.3.0 - Copyright 2017-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0