- Admin 엔티티에 MustChangePassword, TempPasswordIssuedAt 필드 추가 - POST /v1/in/account/password/temp 엔드포인트 추가 - 임시비밀번호 생성(12자, 영대소+숫자+특수) 및 메일 발송 - 로그인 시 CHANGE_PASSWORD 분기 추가 (VERIFY_EMAIL > CHANGE_PASSWORD > GO_DASHBOARD) - 비밀번호 변경 시 MustChangePassword 플래그 자동 해제 - LoginResponseDto에 must_change_password 필드 추가 - EF Core 마이그레이션 생성 및 적용 Closes #207
49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace SPMS.Application.DTOs.Auth;
|
|
|
|
public class LoginResponseDto
|
|
{
|
|
[JsonPropertyName("access_token")]
|
|
public string AccessToken { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("refresh_token")]
|
|
public string RefreshToken { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("expires_in")]
|
|
public int ExpiresIn { get; set; }
|
|
|
|
[JsonPropertyName("next_action")]
|
|
public string NextAction { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("email_verified")]
|
|
public bool EmailVerified { get; set; }
|
|
|
|
[JsonPropertyName("verify_session_id")]
|
|
public string? VerifySessionId { get; set; }
|
|
|
|
[JsonPropertyName("email_sent")]
|
|
public bool? EmailSent { get; set; }
|
|
|
|
[JsonPropertyName("must_change_password")]
|
|
public bool? MustChangePassword { get; set; }
|
|
|
|
[JsonPropertyName("admin")]
|
|
public AdminInfoDto? Admin { get; set; }
|
|
}
|
|
|
|
public class AdminInfoDto
|
|
{
|
|
[JsonPropertyName("admin_code")]
|
|
public string AdminCode { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("email")]
|
|
public string Email { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("name")]
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("role")]
|
|
public string Role { get; set; } = string.Empty;
|
|
}
|