aboutsummaryrefslogtreecommitdiff
path: root/zenserver/auth/authmgr.h
diff options
context:
space:
mode:
authorPer Larsson <[email protected]>2022-02-03 15:40:04 +0100
committerPer Larsson <[email protected]>2022-02-03 15:40:04 +0100
commitd6741139e1ea3c6bb1462da61a81c42a80ac6e59 (patch)
treea422d3f591c954e9f5a20c6a28f60bd08923185e /zenserver/auth/authmgr.h
parentMerge branch 'main' into auth (diff)
downloadzen-d6741139e1ea3c6bb1462da61a81c42a80ac6e59.tar.xz
zen-d6741139e1ea3c6bb1462da61a81c42a80ac6e59.zip
Minor cleanup of free functions.
Diffstat (limited to 'zenserver/auth/authmgr.h')
-rw-r--r--zenserver/auth/authmgr.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/zenserver/auth/authmgr.h b/zenserver/auth/authmgr.h
index 9695b4366..a641b9c8f 100644
--- a/zenserver/auth/authmgr.h
+++ b/zenserver/auth/authmgr.h
@@ -9,6 +9,21 @@
namespace zen {
+struct AuthEncryptionKey
+{
+ IoBuffer Key;
+ IoBuffer IV;
+
+ static AuthEncryptionKey Default();
+};
+
+struct AuthConfig
+{
+ std::filesystem::path RootDirectory;
+ std::chrono::seconds UpdateInterval{30};
+ AuthEncryptionKey EncryptionKey;
+};
+
class AuthMgr
{
public:
@@ -38,23 +53,8 @@ public:
};
virtual OpenIdAccessToken GetOpenIdAccessToken(std::string_view ProviderName) = 0;
-};
-
-struct AuthEncryptionKey
-{
- IoBuffer Key;
- IoBuffer IV;
- static AuthEncryptionKey Default();
+ static std::unique_ptr<AuthMgr> Create(const AuthConfig& Config);
};
-struct AuthConfig
-{
- std::filesystem::path RootDirectory;
- std::chrono::seconds UpdateInterval{30};
- AuthEncryptionKey EncryptionKey;
-};
-
-std::unique_ptr<AuthMgr> MakeAuthMgr(const AuthConfig& Config);
-
} // namespace zen