Left some TODO's. Next thing is to check if the token is valid
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
#ifndef TOKEN_MANAGER_H_
|
||||
#define TOKEN_MANAGER_H_
|
||||
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include "models.h"
|
||||
#include "types/scopes.h"
|
||||
|
||||
class token_manager
|
||||
{
|
||||
@@ -12,6 +14,8 @@ public:
|
||||
|
||||
loginResult retrieve_token();
|
||||
loginResult retrieve_token(std::string_view);
|
||||
|
||||
bool is_token_valid(std::string&, Scope);
|
||||
private:
|
||||
auth_credentials parse_auth_credentials(std::string_view);
|
||||
};
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#ifndef SCOPES_H_
|
||||
#define SCOPES_H_
|
||||
|
||||
enum class Scope
|
||||
{
|
||||
upload = 0,
|
||||
download
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user