Add server one time pin support to nvhttp

This commit is contained in:
Yukino Song
2024-08-27 13:28:55 +08:00
parent 19630a9cb5
commit 70fbd26906
3 changed files with 91 additions and 6 deletions

View File

@@ -7,6 +7,7 @@
// standard includes
#include <string>
#include <chrono>
// lib includes
#include <boost/property_tree/ptree.hpp>
@@ -14,6 +15,8 @@
// local includes
#include "thread_safe.h"
using namespace std::chrono_literals;
/**
* @brief Contains all the functions and variables related to the nvhttp (GameStream) server.
*/
@@ -41,6 +44,8 @@ namespace nvhttp {
*/
constexpr auto PORT_HTTPS = -5;
constexpr auto OTP_EXPIRE_DURATION = 60s;
/**
* @brief Start the nvhttp server.
* @examples
@@ -62,6 +67,8 @@ namespace nvhttp {
bool
pin(std::string pin, std::string name);
std::string request_otp(const std::string& passphrase);
/**
* @brief Remove single client.
* @examples