aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Constants
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Api/Constants')
-rw-r--r--Jellyfin.Api/Constants/AuthenticationSchemes.cs13
-rw-r--r--Jellyfin.Api/Constants/Policies.cs18
-rw-r--r--Jellyfin.Api/Constants/UserRoles.cs23
3 files changed, 54 insertions, 0 deletions
diff --git a/Jellyfin.Api/Constants/AuthenticationSchemes.cs b/Jellyfin.Api/Constants/AuthenticationSchemes.cs
new file mode 100644
index 000000000..bac3379e7
--- /dev/null
+++ b/Jellyfin.Api/Constants/AuthenticationSchemes.cs
@@ -0,0 +1,13 @@
+namespace Jellyfin.Api.Constants
+{
+ /// <summary>
+ /// Authentication schemes for user authentication in the API.
+ /// </summary>
+ public static class AuthenticationSchemes
+ {
+ /// <summary>
+ /// Scheme name for the custom legacy authentication.
+ /// </summary>
+ public const string CustomAuthentication = "CustomAuthentication";
+ }
+}
diff --git a/Jellyfin.Api/Constants/Policies.cs b/Jellyfin.Api/Constants/Policies.cs
new file mode 100644
index 000000000..e2b383f75
--- /dev/null
+++ b/Jellyfin.Api/Constants/Policies.cs
@@ -0,0 +1,18 @@
+namespace Jellyfin.Api.Constants
+{
+ /// <summary>
+ /// Policies for the API authorization.
+ /// </summary>
+ public static class Policies
+ {
+ /// <summary>
+ /// Policy name for requiring first time setup or elevated privileges.
+ /// </summary>
+ public const string FirstTimeSetupOrElevated = "FirstTimeOrElevated";
+
+ /// <summary>
+ /// Policy name for requiring elevated privileges.
+ /// </summary>
+ public const string RequiresElevation = "RequiresElevation";
+ }
+}
diff --git a/Jellyfin.Api/Constants/UserRoles.cs b/Jellyfin.Api/Constants/UserRoles.cs
new file mode 100644
index 000000000..d9a536e7d
--- /dev/null
+++ b/Jellyfin.Api/Constants/UserRoles.cs
@@ -0,0 +1,23 @@
+namespace Jellyfin.Api.Constants
+{
+ /// <summary>
+ /// Constants for user roles used in the authentication and authorization for the API.
+ /// </summary>
+ public static class UserRoles
+ {
+ /// <summary>
+ /// Guest user.
+ /// </summary>
+ public const string Guest = "Guest";
+
+ /// <summary>
+ /// Regular user with no special privileges.
+ /// </summary>
+ public const string User = "User";
+
+ /// <summary>
+ /// Administrator user with elevated privileges.
+ /// </summary>
+ public const string Administrator = "Administrator";
+ }
+}