rama creada apartir de master en j
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user