Authorized endpoints and updated README

This commit is contained in:
kdeng00
2019-09-25 23:03:38 -04:00
parent 698ccf9099
commit 32ed611112
13 changed files with 563 additions and 459 deletions
+16 -17
View File
@@ -13,30 +13,29 @@
#include "model/Models.h"
#include "type/Scopes.h"
namespace manager
namespace manager {
class TokenManager
{
class TokenManager
{
public:
TokenManager();
public:
TokenManager();
model::LoginResult retrieveToken(const model::BinaryPath&);
model::LoginResult retrieveToken(const model::BinaryPath&);
bool isTokenValid(std::string&, type::Scope);
bool testAuth(const model::BinaryPath&);
private:
cpr::Response sendRequest(std::string_view, nlohmann::json&);
bool isTokenValid(std::string&, type::Scope);
bool testAuth(const model::BinaryPath&);
private:
cpr::Response sendRequest(std::string_view, nlohmann::json&);
nlohmann::json createTokenBody(const model::AuthCredentials&);
nlohmann::json createTokenBody(const model::AuthCredentials&);
model::AuthCredentials parseAuthCredentials(std::string_view);
model::AuthCredentials parseAuthCredentials(const model::BinaryPath&);
model::AuthCredentials parseAuthCredentials(std::string_view);
model::AuthCredentials parseAuthCredentials(const model::BinaryPath&);
std::vector<std::string> extractScopes(const jwt::decoded_jwt&&);
std::pair<bool, std::vector<std::string>> fetchAuthHeader(const std::string&);
std::vector<std::string> extractScopes(const jwt::decoded_jwt&&);
std::pair<bool, std::vector<std::string>> fetchAuthHeader(const std::string&);
bool tokenSupportsScope(const std::vector<std::string>, const std::string&&);
};
bool tokenSupportsScope(const std::vector<std::string>, const std::string&&);
};
}
#endif