aboutsummaryrefslogtreecommitdiff
path: root/Plugins.Essentials/src/Users/IUser.cs
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2023-01-08 14:44:01 -0500
committerLibravatar vnugent <public@vaughnnugent.com>2023-01-08 14:44:01 -0500
commitbe6dc557a3b819248b014992eb96c1cb21f8112b (patch)
tree5361530552856ba8154bfcfbfac8377549117c9e /Plugins.Essentials/src/Users/IUser.cs
parent072a1294646542a73007784d08a35ffcad557b1b (diff)
Initial commit
Diffstat (limited to 'Plugins.Essentials/src/Users/IUser.cs')
-rw-r--r--Plugins.Essentials/src/Users/IUser.cs74
1 files changed, 74 insertions, 0 deletions
diff --git a/Plugins.Essentials/src/Users/IUser.cs b/Plugins.Essentials/src/Users/IUser.cs
new file mode 100644
index 0000000..28c5305
--- /dev/null
+++ b/Plugins.Essentials/src/Users/IUser.cs
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2022 Vaughn Nugent
+*
+* Library: VNLib
+* Package: VNLib.Plugins.Essentials
+* File: IUser.cs
+*
+* IUser.cs is part of VNLib.Plugins.Essentials which is part of the larger
+* VNLib collection of libraries and utilities.
+*
+* VNLib.Plugins.Essentials is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Affero General Public License as
+* published by the Free Software Foundation, either version 3 of the
+* License, or (at your option) any later version.
+*
+* VNLib.Plugins.Essentials is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Affero General Public License for more details.
+*
+* You should have received a copy of the GNU Affero General Public License
+* along with this program. If not, see https://www.gnu.org/licenses/.
+*/
+
+using System;
+using System.Collections.Generic;
+
+using VNLib.Utils;
+using VNLib.Utils.Async;
+using VNLib.Utils.Memory;
+
+#nullable enable
+
+namespace VNLib.Plugins.Essentials.Users
+{
+ /// <summary>
+ /// Represents an abstract user account
+ /// </summary>
+ public interface IUser : IAsyncExclusiveResource, IDisposable, IObjectStorage, IEnumerable<KeyValuePair<string, string>>, IIndexable<string, string>
+ {
+ /// <summary>
+ /// The user's privilage level
+ /// </summary>
+ ulong Privilages { get; }
+ /// <summary>
+ /// The user's ID
+ /// </summary>
+ string UserID { get; }
+ /// <summary>
+ /// Date the user's account was created
+ /// </summary>
+ DateTimeOffset Created { get; }
+ /// <summary>
+ /// The user's password hash if retreived from the backing store, otherwise null
+ /// </summary>
+ PrivateString? PassHash { get; }
+ /// <summary>
+ /// Status of account
+ /// </summary>
+ UserStatus Status { get; set; }
+ /// <summary>
+ /// Is the account only usable from local network?
+ /// </summary>
+ bool LocalOnly { get; set; }
+ /// <summary>
+ /// The user's email address
+ /// </summary>
+ string EmailAddress { get; set; }
+ /// <summary>
+ /// Marks the user for deletion on release
+ /// </summary>
+ void Delete();
+ }
+} \ No newline at end of file