aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Models/Http/HttpCreateTokenRequestV2.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-04-16 22:11:29 +0800
committercrupest <crupest@outlook.com>2022-04-16 22:11:29 +0800
commitb4f783c20aa47cb601dc81e0dad07aa92517c229 (patch)
tree5555a97984df994910c26b3d5f2fc897cfbdfd28 /BackEnd/Timeline/Models/Http/HttpCreateTokenRequestV2.cs
parent750785728f57af11dfc682ee9ee870e4dc191981 (diff)
downloadtimeline-b4f783c20aa47cb601dc81e0dad07aa92517c229.tar.gz
timeline-b4f783c20aa47cb601dc81e0dad07aa92517c229.tar.bz2
timeline-b4f783c20aa47cb601dc81e0dad07aa92517c229.zip
...
Diffstat (limited to 'BackEnd/Timeline/Models/Http/HttpCreateTokenRequestV2.cs')
-rw-r--r--BackEnd/Timeline/Models/Http/HttpCreateTokenRequestV2.cs25
1 files changed, 25 insertions, 0 deletions
diff --git a/BackEnd/Timeline/Models/Http/HttpCreateTokenRequestV2.cs b/BackEnd/Timeline/Models/Http/HttpCreateTokenRequestV2.cs
new file mode 100644
index 00000000..acd8d2e5
--- /dev/null
+++ b/BackEnd/Timeline/Models/Http/HttpCreateTokenRequestV2.cs
@@ -0,0 +1,25 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace Timeline.Models.Http
+{
+ public class HttpCreateTokenRequestV2
+ {
+ /// <summary>
+ /// The username.
+ /// </summary>
+ [Required]
+ public string Username { get; set; } = default!;
+ /// <summary>
+ /// The password.
+ /// </summary>
+ [Required]
+ public string Password { get; set; } = default!;
+ /// <summary>
+ /// Optional token validation period. In days. If not specified, the token will be valid until being revoked explicited.
+ /// </summary>
+ [Range(1, 365)]
+ public int? ValidDays { get; set; }
+ }
+}
+