using ROLAC.API.DTOs.Permissions;
namespace ROLAC.API.DTOs.Auth;
public class LoginResponse
{
/// Short-lived JWT (15 min). Store in memory — never in localStorage.
public string AccessToken { get; set; } = null!;
/// Seconds until the access token expires. Always 900 (15 × 60).
public int ExpiresIn { get; set; }
public UserInfo User { get; set; } = null!;
}
public class UserInfo
{
public string Id { get; set; } = null!;
public string Email { get; set; } = null!;
public IList Roles { get; set; } = [];
public string LanguagePreference { get; set; } = "en";
///
/// Effective permissions (union across the user's roles), keyed by module name.
/// Lets the SPA hide nav/buttons. Authoritative enforcement is server-side.
///
public Dictionary Permissions { get; set; } = [];
}