- LoginRequestDto, LoginResponseDto 추가 - IAuthService, AuthService 구현 (BCrypt 비밀번호 검증) - AdminRepository 구현 (GetByEmailAsync) - AuthController 추가 (POST /v1/in/auth/login) - DI 등록 (IAuthService, IAdminRepository) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
34 lines
851 B
C#
34 lines
851 B
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("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;
|
|
}
|