AlexaClientSDK  3.0.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::acsdkAuthorization::AuthorizationManagerStorage Class Reference

#include <AuthorizationManagerStorage.h>

Public Member Functions

bool store (const std::string &adapterId, const std::string &userId)
 
bool load (std::string &adapterId, std::string &userId)
 
void clear ()
 

Static Public Member Functions

static std::shared_ptr< AuthorizationManagerStoragecreate (const std::shared_ptr< avsCommon::sdkInterfaces::storage::MiscStorageInterface > &storage)
 

Detailed Description

An encapsulation of logic used to read and write the adapterId and userId, which are used to identify the instance of the user that is currently logged in. This reuses MiscStorageInterface.

Member Function Documentation

◆ clear()

void alexaClientSDK::acsdkAuthorization::AuthorizationManagerStorage::clear ( )

Clears the table. This will not delete the database.

◆ create()

static std::shared_ptr<AuthorizationManagerStorage> alexaClientSDK::acsdkAuthorization::AuthorizationManagerStorage::create ( const std::shared_ptr< avsCommon::sdkInterfaces::storage::MiscStorageInterface > &  storage)
static

Create a storage interface.

Parameters
storageThe underlying storage interface.

◆ load()

bool alexaClientSDK::acsdkAuthorization::AuthorizationManagerStorage::load ( std::string &  adapterId,
std::string &  userId 
)

Loads information from the database.

Parameters
[out]adapterIdThe adapterId.
[out]userIdThe userId.
Returns
Whether the data was successfully loaded.

◆ store()

bool alexaClientSDK::acsdkAuthorization::AuthorizationManagerStorage::store ( const std::string &  adapterId,
const std::string &  userId 
)

Stores the information into the database. This will overwrite any existing entries. are existing entries. Upon failure, the database may not be in a consistent state. Clearing is recommended.

Parameters
adapterIdThe adapterId. This is required.
userIdThe userId. This can be empty.
Returns
Whether the data was successfully stored.

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

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