rama creada apartir de master en j

This commit is contained in:
jrojas
2026-06-26 10:29:23 +02:00
parent 319fd3dfb0
commit c1517fda87
2810 changed files with 1927392 additions and 25392 deletions
@@ -1,19 +1,27 @@
namespace adas_core.Domain.Models.Responses;
/// <summary>
/// Represents the response data returned from a login operation.
/// </summary>
public class LoginResponse
{
public string Token { get; set; } = "";
public string RefreshToken { get; set; } = "";
public DateTime Expiration { get; set; } = DateTime.MinValue;
/// <summary>
/// Determines whether the item has expired by comparing its <see cref="Expiration"/> value to the current UTC time.
/// Returns <c>true</c> when the expiration date has passed, or when no expiration date has been set (i.e., <see cref="DateTime.MinValue"/>), treating unset expirations as expired.
/// </summary>
/// <returns><c>true</c> if the item is expired or has no expiration date set; otherwise, <c>false</c>.</returns>
public bool IsExpired()
{
if (Expiration != DateTime.MinValue)
{
if (Expiration < DateTime.UtcNow) return true;
return false;
if (Expiration != DateTime.MinValue)
{
if (Expiration < DateTime.UtcNow) return true;
return false;
}
return true;
}
return true;
}
}