aboutsummaryrefslogtreecommitdiff
path: root/zenserver/auth/authservice.cpp
diff options
context:
space:
mode:
authorPer Larsson <[email protected]>2022-01-24 11:11:10 +0100
committerPer Larsson <[email protected]>2022-01-24 11:11:10 +0100
commitdc6becffb513280170958f94e18c1b2966ade4d1 (patch)
treec7f9cccafcc21e241abdecde6f5219ab1009aff6 /zenserver/auth/authservice.cpp
parentFormat fix. (diff)
downloadzen-dc6becffb513280170958f94e18c1b2966ade4d1.tar.xz
zen-dc6becffb513280170958f94e18c1b2966ade4d1.zip
Refactored upstream cache to better handle different states in prep for dynamic auth tokens.
Diffstat (limited to 'zenserver/auth/authservice.cpp')
-rw-r--r--zenserver/auth/authservice.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/zenserver/auth/authservice.cpp b/zenserver/auth/authservice.cpp
new file mode 100644
index 000000000..c6def15b4
--- /dev/null
+++ b/zenserver/auth/authservice.cpp
@@ -0,0 +1,37 @@
+// Copyright Epic Games, Inc. All Rights Reserved.
+
+#include <auth/authservice.h>
+#include <zencore/string.h>
+
+namespace zen {
+
+using namespace std::literals;
+
+HttpAuthService::HttpAuthService()
+{
+ m_Router.RegisterRoute(
+ "token",
+ [this](HttpRouterRequest& RouterRequest) {
+ HttpServerRequest& ServerRequest = RouterRequest.ServerRequest();
+ ServerRequest.WriteResponse(HttpResponseCode::OK);
+ },
+ HttpVerb::kPost);
+}
+
+HttpAuthService::~HttpAuthService()
+{
+}
+
+const char*
+HttpAuthService::BaseUri() const
+{
+ return "/auth/";
+}
+
+void
+HttpAuthService::HandleRequest(zen::HttpServerRequest& Request)
+{
+ m_Router.HandleRequest(Request);
+}
+
+} // namespace zen