#ifndef TOKEN_MANAGER_H_ #define TOKEN_MANAGER_H_ #include #include #include #include #include #include "models/models.h" #include "types/scopes.h" class token_manager { public: token_manager(); 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); std::vector extract_scopes(const jwt::decoded_jwt&&); std::pair> fetch_auth_header(const std::string&); bool token_supports_scope(const std::vector, const std::string&&); }; #endif