aboutsummaryrefslogtreecommitdiff
path: root/zenserver/auth/authservice.cpp
blob: eecad45bf12e38857093753e43a03fe881508bc7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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",
		[](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