58 lines
1.2 KiB
C#
58 lines
1.2 KiB
C#
// <copyright file="SessionDto.cs" company="alveus.dev">
|
|
// Copyright (c) alveus.dev. All rights reserved. Licensed under the MIT License.
|
|
// </copyright>
|
|
|
|
using Astral.Core.Constants;
|
|
|
|
namespace Astral.Services.Dtos;
|
|
|
|
/// <summary>
|
|
/// Session information.
|
|
/// </summary>
|
|
public class SessionDto
|
|
{
|
|
/// <summary>
|
|
/// User id.
|
|
/// </summary>
|
|
public Guid UserId { get; set; }
|
|
|
|
/// <summary>
|
|
/// User name.
|
|
/// </summary>
|
|
public string UserName { get; set; }
|
|
|
|
/// <summary>
|
|
/// Access token.
|
|
/// </summary>
|
|
public string AccessToken { get; set; }
|
|
|
|
/// <summary>
|
|
/// Refresh token.
|
|
/// </summary>
|
|
public string RefreshToken { get; set; }
|
|
|
|
/// <summary>
|
|
/// Created at.
|
|
/// </summary>
|
|
public DateTime CreatedAt { get; set; }
|
|
|
|
/// <summary>
|
|
/// Access token expiry (UTC).
|
|
/// </summary>
|
|
public DateTime AccessTokenExpires { get; set; }
|
|
|
|
/// <summary>
|
|
/// Refresh token expiry (UTC).
|
|
/// </summary>
|
|
public DateTime RefreshTokenExpires { get; set; }
|
|
|
|
/// <summary>
|
|
/// The session token scope.
|
|
/// </summary>
|
|
public TokenScope Scope { get; set; }
|
|
|
|
/// <summary>
|
|
/// The session user role.
|
|
/// </summary>
|
|
public UserRole Role { get; set; }
|
|
}
|