Alexa Auto SDK
4.3
|
Public Types | |
using | AuthorizationState = aace::authorization::AuthorizationEngineInterface::AuthorizationState |
Describes the authorization states. | |
Public Member Functions | |
virtual void | eventReceived (const std::string &service, const std::string &event)=0 |
virtual void | authorizationStateChanged (const std::string &service, AuthorizationState state)=0 |
virtual void | authorizationError (const std::string &service, const std::string &error, const std::string &message)=0 |
virtual std::string | getAuthorizationData (const std::string &service, const std::string &key)=0 |
virtual void | setAuthorizationData (const std::string &service, const std::string &key, const std::string &data)=0 |
void | startAuthorization (const std::string &service, const std::string &data) |
void | cancelAuthorization (const std::string &service) |
void | sendEvent (const std::string &service, const std::string &event) |
void | logout (const std::string &service) |
virtual | ~Authorization () |
The Authorization class should be extended to carry out the authorizations required for the Engine.
This class serves as a single platform interface for all the authorization services supported by the Engine, (such as CBL). The platform implementation must use the platform interface to interact with the service and follows the protocol established by the service to authorize a device. For information about the protocol, see the README file appropriate to the authorization service. For example, see the README in the CBL module to see how the Authorization platform interface works with CBL.
|
virtualdefault |
Destructor
|
pure virtual |
Notifies the platform implementation about the authorization event.
service | Indicates the authorization service. |
event | JSON representation of the authorization event as defined by the authorization service. |
|
pure virtual |
Notifies the platform implementation about a change in authorization state.
service | Indicates the authorization service. |
state | The authorization state represented using AuthorizationState |
|
pure virtual |
Notifies the platform implementation about any error in the authorization process.
service | Indicates the authorization service. |
error | Indicates the type of authorization error. The possible types are defined by each authorization service. |
message | Error message for logging purposes. |
|
pure virtual |
Retrieves the authorization data from the platform implementation.
setAuthorizationData
.service | Indicates the authorization service. |
key | The key of the data requested. |
|
pure virtual |
Notifies the platform implementation to store the authorization data.
service | Indicates the authorization service. |
key | Represents the key of the data |
data | Represents the data to be stored. |
void aace::authorization::Authorization::startAuthorization | ( | const std::string & | service, |
const std::string & | data | ||
) |
Notifies the Engine to start the authorization process. Engine to call authorizationStateChanged
with AUTHORIZING
on the start of authorization process. Engine to call authorizationStateChanged
with AUTHORIZED
on the successful authorization.
service | Indicates the authorization service. |
data | Represents the data in JSON format. The content of the JSON object is defined by each authorization service. |
void aace::authorization::Authorization::cancelAuthorization | ( | const std::string & | service | ) |
Notifies the Engine to cancel the authorization process.
service | Indicates the authorization service. |
void aace::authorization::Authorization::sendEvent | ( | const std::string & | service, |
const std::string & | event | ||
) |
Notifies the Engine of the authorization event from the platform implementation.
service | Indicates the authorization service. |
event | Represents the event in JSON format. The content of the JSON object is defined by each authorization service. |
void aace::authorization::Authorization::logout | ( | const std::string & | service | ) |
Notifies the Engine to log out of an authorization. Engine calls authorizationStateChanged
with UNAUTHORIZED
on the successful logout.
service | Indicates the authorization service of which the Engine will log out. |
Alexa Auto SDK 4.3 - Copyright 2017-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0