aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Models/Http/HttpCreateTokenRequestV2.cs
blob: acd8d2e55cf60603547a3504b3d2ba269134fa2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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; }
    }
}