- Service 엔티티에 ApnsAuthType/ApnsCertificate/ApnsCertPassword/ApnsCertExpiresAt 추가 - EF Core Configuration + Migration (AddApnsP12Support) - DTO: AuthType 분기 (p8/p12) 지원, p12 필드 추가 - 서비스 로직: AuthType별 검증/저장/조회 분기, X509CertificateLoader로 만료일 추출 - AuthType 전환 시 이전 타입 필드 null 초기화 - 컨트롤러 Swagger Description 업데이트 Closes #214
28 lines
1.0 KiB
C#
28 lines
1.0 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace SPMS.Application.DTOs.Service;
|
|
|
|
public class ApnsCredentialsRequestDto
|
|
{
|
|
[Required(ErrorMessage = "Bundle ID는 필수입니다.")]
|
|
public string BundleId { get; set; } = string.Empty;
|
|
|
|
[Required(ErrorMessage = "인증 타입은 필수입니다.")]
|
|
[RegularExpression("^(p8|p12)$", ErrorMessage = "AuthType은 p8 또는 p12만 가능합니다.")]
|
|
public string AuthType { get; set; } = "p8";
|
|
|
|
// p8 필드 (AuthType=p8일 때 서비스에서 필수 검증)
|
|
[StringLength(10, MinimumLength = 10, ErrorMessage = "Key ID는 10자리여야 합니다.")]
|
|
public string? KeyId { get; set; }
|
|
|
|
[StringLength(10, MinimumLength = 10, ErrorMessage = "Team ID는 10자리여야 합니다.")]
|
|
public string? TeamId { get; set; }
|
|
|
|
public string? PrivateKey { get; set; }
|
|
|
|
// p12 필드 (AuthType=p12일 때 서비스에서 필수 검증)
|
|
public string? CertificateBase64 { get; set; }
|
|
|
|
public string? CertPassword { get; set; }
|
|
}
|