some changes

This commit is contained in:
kdeng00
2019-10-13 11:29:40 -04:00
parent 32ed611112
commit 024134b801
14 changed files with 204 additions and 132 deletions
+3 -4
View File
@@ -14,12 +14,11 @@
#include "type/Scopes.h"
namespace manager {
class TokenManager
{
class TokenManager {
public:
TokenManager();
model::LoginResult retrieveToken(const model::BinaryPath&);
model::Token retrieveToken(const model::BinaryPath&);
bool isTokenValid(std::string&, type::Scope);
bool testAuth(const model::BinaryPath&);
@@ -34,7 +33,7 @@ private:
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&&);
};
}
+3 -5
View File
@@ -7,18 +7,16 @@
#include "model/Models.h"
namespace manager {
class UserManager
{
class UserManager {
public:
UserManager(const model::BinaryPath&);
model::RegisterResult registerUser(model::User&);
bool doesUserExist(const model::User&);
bool validatePassword(const model::User&);
void printUser(const model::User&);
void registerUser(model::User&);
static model::User userDtoConv(dto::UserDto::ObjectWrapper&);
private:
model::BinaryPath m_bConf;
};