- verify API: verifySessionId 기반 입력 지원 (email 하위호환) - verify API: 시도 횟수 5회 제한 (30분 TTL) - verify API: 응답에 verified, nextAction 필드 추가 - resend API 신규: POST /v1/in/auth/email/verify/resend - resend API: 60초 쿨다운, 기존 코드 자동 무효화 - email_verify TTL 1시간→5분 변경 (signup/login 포함) - ErrorCodes 추가: VerifyResendCooldown(116), VerifyAttemptExceeded(117) Closes #205
58 lines
1.9 KiB
C#
58 lines
1.9 KiB
C#
namespace SPMS.Domain.Common;
|
|
|
|
/// <summary>
|
|
/// SPMS 에러 코드 상수
|
|
/// 코드 체계: [상태(0=성공,1=실패)][도메인(0~8)][순번]
|
|
/// </summary>
|
|
public static class ErrorCodes
|
|
{
|
|
// === 성공 ===
|
|
public const string Success = "000";
|
|
|
|
// === 공통 (0) ===
|
|
public const string BadRequest = "101";
|
|
public const string Unauthorized = "102";
|
|
public const string NotFound = "103";
|
|
public const string InternalError = "104";
|
|
public const string NoChange = "105";
|
|
public const string LimitExceeded = "106";
|
|
public const string Conflict = "107";
|
|
public const string Forbidden = "108";
|
|
|
|
// === Auth (1) ===
|
|
public const string VerificationCodeError = "111";
|
|
public const string LoginFailed = "112";
|
|
public const string LoginAttemptExceeded = "113";
|
|
public const string TermsNotAgreed = "114";
|
|
public const string PrivacyNotAgreed = "115";
|
|
public const string VerifyResendCooldown = "116";
|
|
public const string VerifyAttemptExceeded = "117";
|
|
|
|
// === Account (2) ===
|
|
public const string PasswordValidationFailed = "121";
|
|
public const string ResetTokenError = "122";
|
|
|
|
// === Service (3) ===
|
|
public const string DecryptionFailed = "131";
|
|
public const string InvalidCredentials = "132";
|
|
public const string ServiceScopeRequired = "133";
|
|
|
|
// === Device (4) ===
|
|
public const string DeviceNotFound = "141";
|
|
public const string DeviceTokenDuplicate = "142";
|
|
|
|
// === Message (5) ===
|
|
public const string MessageNotFound = "151";
|
|
|
|
// === Push (6) ===
|
|
public const string PushSendFailed = "161";
|
|
public const string PushStateChangeNotAllowed = "162";
|
|
public const string JobNotFound = "163";
|
|
public const string JobAlreadyCompleted = "164";
|
|
|
|
// === File (8) ===
|
|
public const string FileNotFound = "181";
|
|
public const string FileTypeNotAllowed = "182";
|
|
public const string FileSizeExceeded = "183";
|
|
}
|