AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::authorization::cblAuthDelegate::CBLAuthDelegateStorageInterface Class Referenceabstract

#include <CBLAuthDelegateStorageInterface.h>

Inheritance diagram for alexaClientSDK::authorization::cblAuthDelegate::CBLAuthDelegateStorageInterface:
Inheritance graph
[legend]

Public Member Functions

virtual ~CBLAuthDelegateStorageInterface ()=default
 
virtual bool createDatabase ()=0
 
virtual bool open ()=0
 
virtual bool setRefreshToken (const std::string &refreshToken)=0
 
virtual bool clearRefreshToken ()=0
 
virtual bool getRefreshToken (std::string *refreshToken)=0
 
virtual bool clear ()=0
 

Detailed Description

The interface to persistent storage needed by a CBLAuthDelegate (Code Based Linking AuthDelegate).

IMPORTANT: Your token storage MUST be encrypted. Note that in the default SDK implementation, we do not provide encryption.

Constructor & Destructor Documentation

◆ ~CBLAuthDelegateStorageInterface()

virtual alexaClientSDK::authorization::cblAuthDelegate::CBLAuthDelegateStorageInterface::~CBLAuthDelegateStorageInterface ( )
virtualdefault

Destructor.

Member Function Documentation

◆ clear()

virtual bool alexaClientSDK::authorization::cblAuthDelegate::CBLAuthDelegateStorageInterface::clear ( )
pure virtual

A utility function to clear all records from storage. Note that the storage will still exist, it will just have not content.

Returns
Whether the database was successfully cleared.

Implemented in alexaClientSDK::authorization::cblAuthDelegate::SQLiteCBLAuthDelegateStorage.

◆ clearRefreshToken()

virtual bool alexaClientSDK::authorization::cblAuthDelegate::CBLAuthDelegateStorageInterface::clearRefreshToken ( )
pure virtual

Clear the stored refresh token value.

Returns
Whether the refresh token was successfully cleared.

Implemented in alexaClientSDK::authorization::cblAuthDelegate::SQLiteCBLAuthDelegateStorage.

◆ createDatabase()

virtual bool alexaClientSDK::authorization::cblAuthDelegate::CBLAuthDelegateStorageInterface::createDatabase ( )
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.

Returns
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::authorization::cblAuthDelegate::SQLiteCBLAuthDelegateStorage.

◆ getRefreshToken()

virtual bool alexaClientSDK::authorization::cblAuthDelegate::CBLAuthDelegateStorageInterface::getRefreshToken ( std::string *  refreshToken)
pure virtual

Get the stored refresh token value.

Parameters
[out]refreshToken
Returns
Whether or not the operation was successful.

Implemented in alexaClientSDK::authorization::cblAuthDelegate::SQLiteCBLAuthDelegateStorage.

◆ open()

virtual bool alexaClientSDK::authorization::cblAuthDelegate::CBLAuthDelegateStorageInterface::open ( )
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.

Returns
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::authorization::cblAuthDelegate::SQLiteCBLAuthDelegateStorage.

◆ setRefreshToken()

virtual bool alexaClientSDK::authorization::cblAuthDelegate::CBLAuthDelegateStorageInterface::setRefreshToken ( const std::string &  refreshToken)
pure virtual

Set the stored refresh token value.

Parameters
refreshTokenThe refresh token to insert into the database.
Returns
Whether the refresh token was successfully stored.

Implemented in alexaClientSDK::authorization::cblAuthDelegate::SQLiteCBLAuthDelegateStorage.


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

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