AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <LWAAuthorizationStorageInterface.h>
Public Member Functions | |
virtual | ~LWAAuthorizationStorageInterface ()=default |
virtual bool | createDatabase ()=0 |
virtual bool | open ()=0 |
virtual bool | openOrCreate ()=0 |
virtual bool | setRefreshToken (const std::string &refreshToken)=0 |
virtual bool | clearRefreshToken ()=0 |
virtual bool | getRefreshToken (std::string *refreshToken)=0 |
virtual bool | setUserId (const std::string &userId)=0 |
virtual bool | getUserId (std::string *userId)=0 |
virtual bool | clear ()=0 |
The interface to persistent storage needed by a LWAAuthorizationInterface.
IMPORTANT: Your token storage MUST be encrypted. Note that in the default SDK implementation, we do not provide encryption.
|
virtualdefault |
Destructor.
|
pure virtual |
A utility function to clear all records from storage. Note that the storage will still exist, it will just have not content.
Implemented in alexaClientSDK::acsdkAuthorization::lwa::LWAAuthorizationStorage, and alexaClientSDK::acsdkAuthorization::lwa::test::StubStorage.
|
pure virtual |
Clear the stored refresh token value.
Implemented in alexaClientSDK::acsdkAuthorization::lwa::LWAAuthorizationStorage, and alexaClientSDK::acsdkAuthorization::lwa::test::StubStorage.
|
pure virtual |
Creates a new database with the given filepath. If the file specified already exists, or if a database is already being handled by this object, then this function returns false.
true
If the database is created ok, or false
if either the file exists or a database is already being handled by this object. Implemented in alexaClientSDK::acsdkAuthorization::lwa::LWAAuthorizationStorage, and alexaClientSDK::acsdkAuthorization::lwa::test::StubStorage.
|
pure virtual |
Get the stored refresh token value.
[out] | refreshToken |
Implemented in alexaClientSDK::acsdkAuthorization::lwa::LWAAuthorizationStorage, and alexaClientSDK::acsdkAuthorization::lwa::test::StubStorage.
|
pure virtual |
Retrieves the UserId associated with the account.
[out] | userId |
Implemented in alexaClientSDK::acsdkAuthorization::lwa::LWAAuthorizationStorage, and alexaClientSDK::acsdkAuthorization::lwa::test::StubStorage.
|
pure virtual |
Open a database with the given filepath. If this object is already managing an open database, or the file does not exist, or there is a problem opening the database, this function returns false.
true
If the database is opened ok, false
if either the file does not exist, if this object is already managing an open database, or if there is another internal reason the database could not be opened. Implemented in alexaClientSDK::acsdkAuthorization::lwa::LWAAuthorizationStorage, and alexaClientSDK::acsdkAuthorization::lwa::test::StubStorage.
|
pure virtual |
Open the database with the given filepath or creates it if it does not exist.
true
If the database is opened and usable. false
if this object is already managing an open database, or if there is another internal reason the database is unusable. Implemented in alexaClientSDK::acsdkAuthorization::lwa::LWAAuthorizationStorage, and alexaClientSDK::acsdkAuthorization::lwa::test::StubStorage.
|
pure virtual |
Set the stored refresh token value.
refreshToken | The refresh token to insert into the database. |
Implemented in alexaClientSDK::acsdkAuthorization::lwa::LWAAuthorizationStorage, and alexaClientSDK::acsdkAuthorization::lwa::test::StubStorage.
|
pure virtual |
Stores the UserId associated with the account.
userId | The userId to store. |
Implemented in alexaClientSDK::acsdkAuthorization::lwa::LWAAuthorizationStorage, and alexaClientSDK::acsdkAuthorization::lwa::test::StubStorage.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0