Kurlyk
Loading...
Searching...
No Matches
kurlyk::http::auth::ITokenStorage Class Referenceabstract

Abstract interface for token persistence. More...

#include <TokenStorage.hpp>

Public Member Functions

virtual ~ITokenStorage ()
virtual bool save (const OAuthToken &token)=0
 Saves an OAuth token.
virtual bool load (OAuthToken &out_token)=0
 Loads an OAuth token.
virtual bool clear ()=0
 Clears any stored token.

Detailed Description

Abstract interface for token persistence.

Implementations may store tokens in memory, files, encrypted keychains, or platform-specific credential vaults. This interface does not prescribe encryption — that is the responsibility of the concrete implementation.

Definition at line 21 of file TokenStorage.hpp.

Constructor & Destructor Documentation

◆ ~ITokenStorage()

virtual kurlyk::http::auth::ITokenStorage::~ITokenStorage ( )
inlinevirtual

Definition at line 23 of file TokenStorage.hpp.

Member Function Documentation

◆ clear()

virtual bool kurlyk::http::auth::ITokenStorage::clear ( )
pure virtual

Clears any stored token.

Returns
true on success.

◆ load()

virtual bool kurlyk::http::auth::ITokenStorage::load ( OAuthToken & out_token)
pure virtual

Loads an OAuth token.

Parameters
out_tokenReceives the loaded token.
Returns
true if a token was successfully loaded.

◆ save()

virtual bool kurlyk::http::auth::ITokenStorage::save ( const OAuthToken & token)
pure virtual

Saves an OAuth token.

Parameters
tokenThe token to persist.
Returns
true on success.

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