From a36e0694ec8b8bb3e0884641c92b613aa15381d9 Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Fri, 21 Jun 2024 21:50:42 +0300 Subject: [PATCH] feat: add token response --- ApiDto/Responses/TokenResponse.cs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 ApiDto/Responses/TokenResponse.cs diff --git a/ApiDto/Responses/TokenResponse.cs b/ApiDto/Responses/TokenResponse.cs new file mode 100644 index 0000000..9761b87 --- /dev/null +++ b/ApiDto/Responses/TokenResponse.cs @@ -0,0 +1,23 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace Mirea.Api.Dto.Responses; + +/// +/// Provides a JWT and RT token. +/// +public class TokenResponse +{ + /// + /// A JWT token for accessing protected resources. + /// + [Required] + public required string AccessToken { get; set; } + + /// + /// The date and time when the JWT token expires. + /// + /// After this date, a new JWT token must be requested. + [Required] + public required DateTime ExpiresIn { get; set; } +} \ No newline at end of file