Alexa Auto SDK  4.3
Public Types | Public Member Functions | List of all members
aace::authorization::AuthorizationEngineInterface Class Referenceabstract

Public Types

enum  AuthorizationState {
  AuthorizationState::UNAUTHORIZED,
  AuthorizationState::AUTHORIZING,
  AuthorizationState::AUTHORIZED
}
 Describes the authorization states. More...
 

Public Member Functions

virtual void onStartAuthorization (const std::string &service, const std::string &data)=0
 
virtual void onCancelAuthorization (const std::string &service)=0
 
virtual void onSendEvent (const std::string &service, const std::string &event)=0
 
virtual void onLogout (const std::string &service)=0
 

Detailed Description

The class to interface with the Authorization Engine.

Member Enumeration Documentation

◆ AuthorizationState

Describes the authorization states.

Enumerator
UNAUTHORIZED 

Device is unauthorized.

AUTHORIZING 

Device authorization in progress.

AUTHORIZED 

Device is authorized.

Member Function Documentation

◆ onStartAuthorization()

virtual void aace::authorization::AuthorizationEngineInterface::onStartAuthorization ( const std::string &  service,
const std::string &  data 
)
pure virtual

Notifies the Engine to start the authorization process. This function is called when Authorization::startAuthorization is called. Engine to call authStateChanged with AUTHORIZING on the start of authorization process. Engine to call authStateChanged with AUTHORIZED on the successful authorization.

Parameters
serviceIndicates the authorization service.
dataRepresents the data in JSON format. The content of the JSON object is defined by each authorization service.

◆ onCancelAuthorization()

virtual void aace::authorization::AuthorizationEngineInterface::onCancelAuthorization ( const std::string &  service)
pure virtual

Notifies the Engine to cancel the authorization. This function is called when Authorization::cancelAuthorization is called.

Note
This does not log out the active authorization.
Parameters
serviceIndicates the authorization service.

◆ onSendEvent()

virtual void aace::authorization::AuthorizationEngineInterface::onSendEvent ( const std::string &  service,
const std::string &  event 
)
pure virtual

Notifies the Engine of an event in the platform implementation.

Parameters
serviceIndicates the authorization service.
eventRepresents the event in JSON format. The content of the JSON object is defined by each authorization service.

◆ onLogout()

virtual void aace::authorization::AuthorizationEngineInterface::onLogout ( const std::string &  service)
pure virtual

Notifies the Engine to log out of the authorization service. This function is called when Authorization::logout is called. Engine calls authorizationStateChanged with UNAUTHORIZED on the successful logout.

Parameters
serviceIndicates 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