diff options
| author | Per Larsson <[email protected]> | 2022-01-25 18:36:41 +0100 |
|---|---|---|
| committer | Per Larsson <[email protected]> | 2022-01-25 18:36:41 +0100 |
| commit | 060c3ed4b49c6341d1a917ec728d26bda7e41494 (patch) | |
| tree | 054b147827833efd715a08f08f85d7d2e25c609c /zenserver/zenserver.cpp | |
| parent | Fixed missing object in project oplog response. (diff) | |
| download | zen-060c3ed4b49c6341d1a917ec728d26bda7e41494.tar.xz zen-060c3ed4b49c6341d1a917ec728d26bda7e41494.zip | |
Added auth manager with support for OIDC providers.
Diffstat (limited to 'zenserver/zenserver.cpp')
| -rw-r--r-- | zenserver/zenserver.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/zenserver/zenserver.cpp b/zenserver/zenserver.cpp index b8648c8ee..524207921 100644 --- a/zenserver/zenserver.cpp +++ b/zenserver/zenserver.cpp @@ -99,6 +99,7 @@ ZEN_THIRD_PARTY_INCLUDES_END // #include "admin/admin.h" +#include "auth/authmgr.h" #include "auth/authservice.h" #include "cache/structuredcache.h" #include "cache/structuredcachestore.h" @@ -203,9 +204,13 @@ public: m_Http = zen::CreateHttpServer(ServerOptions.HttpServerClass); m_Http->Initialize(ServerOptions.BasePort); - m_AuthService = std::make_unique<zen::HttpAuthService>(); + m_AuthMgr = MakeAuthMgr({.RootDirectory = m_DataRoot / "auth"}); + m_AuthService = std::make_unique<zen::HttpAuthService>(*m_AuthMgr); m_Http->RegisterService(*m_AuthService); + m_AuthMgr->AddOpenIdProvider( + {.Name = "Okta"sv, .Url = "https://epicgames.okta.com/oauth2/auso645ojjWVdRI3d0x7"sv, .ClientId = "0oapq1knoglGFqQvr0x7"sv}); + m_Http->RegisterService(m_HealthService); m_Http->RegisterService(m_StatsService); m_Http->RegisterService(m_StatusService); @@ -527,6 +532,7 @@ private: } zen::Ref<zen::HttpServer> m_Http; + std::unique_ptr<zen::AuthMgr> m_AuthMgr; std::unique_ptr<zen::HttpAuthService> m_AuthService; zen::HttpStatusService m_StatusService; zen::HttpStatsService m_StatsService; |