Kurlyk
Loading...
Searching...
No Matches
TokenStorage.hpp
Go to the documentation of this file.
1#pragma once
2#ifndef _KURLYK_HTTP_AUTH_TOKEN_STORAGE_HPP_INCLUDED
3#define _KURLYK_HTTP_AUTH_TOKEN_STORAGE_HPP_INCLUDED
4
7
9#include <string>
10
11namespace kurlyk {
12namespace http {
13namespace auth {
14
22 public:
23 virtual ~ITokenStorage() {}
24
28 virtual bool save(const OAuthToken& token) = 0;
29
33 virtual bool load(OAuthToken& out_token) = 0;
34
37 virtual bool clear() = 0;
38 };
39
40} // namespace auth
41} // namespace http
42} // namespace kurlyk
43
44#endif // _KURLYK_HTTP_AUTH_TOKEN_STORAGE_HPP_INCLUDED
Defines the OAuthToken structure for storing OAuth2 token data.
Abstract interface for token persistence.
virtual bool clear()=0
Clears any stored token.
virtual bool load(OAuthToken &out_token)=0
Loads an OAuth token.
virtual bool save(const OAuthToken &token)=0
Saves an OAuth token.
Primary namespace for the Kurlyk library, encompassing initialization, request management,...
Holds the result of an OAuth2 token exchange.