#region ========================================================================= USING ===================================================================================== using Lumina.Domain.Common.Primitives; #endregion namespace Lumina.Application.Common.Errors; /// /// Application authentication related error types. /// public static partial class Errors { /// /// Error types for application authentication operations. /// public static class Authentication { /// /// Gets the error that reports that a username already exists. /// public static Error UsernameAlreadyExists => Error.Conflict(description: nameof(UsernameAlreadyExists)); /// /// Gets the error that reports that a username does not exist. /// public static Error UsernameDoesNotExist => Error.NotFound(description: nameof(UsernameDoesNotExist)); /// /// Gets the error that reports that a username cannot be empty. /// public static Error UsernameCannotBeEmpty => Error.Validation(description: nameof(UsernameCannotBeEmpty)); /// /// Gets the error that reports that a time-based one-time password cannot be empty. /// public static Error TotpCannotBeEmpty => Error.Validation(description: nameof(TotpCannotBeEmpty)); /// /// Gets the error that reports that a password cannot be empty. /// public static Error PasswordCannotBeEmpty => Error.Validation(description: nameof(PasswordCannotBeEmpty)); /// /// Gets the error that reports that a new password cannot be empty. /// public static Error NewPasswordCannotBeEmpty => Error.Validation(description: nameof(NewPasswordCannotBeEmpty)); /// /// Gets the error that reports that a current password cannot be empty. /// public static Error CurrentPasswordCannotBeEmpty => Error.Validation(description: nameof(CurrentPasswordCannotBeEmpty)); /// /// Gets the error that reports that a password confirmation cannot be empty. /// public static Error PasswordConfirmCannotBeEmpty => Error.Validation(description: nameof(PasswordConfirmCannotBeEmpty)); /// /// Gets the error that reports that a new password confirmation cannot be empty. /// public static Error NewPasswordConfirmCannotBeEmpty => Error.Validation(description: nameof(NewPasswordConfirmCannotBeEmpty)); /// /// Gets the error that reports that a password is invalid. /// public static Error InvalidPassword => Error.Validation(description: nameof(InvalidPassword)); /// /// Gets the error that reports that a username must be between 3 and 255 characters long. /// public static Error UsernameMustBeBetween3And255CharactersLong => Error.Validation(description: nameof(UsernameMustBeBetween3And255CharactersLong)); /// /// Gets the error that reports that a username is invalid. /// public static Error InvalidUsername => Error.Validation(description: nameof(InvalidUsername)); /// /// Gets the error that reports that a password and its confirmation do not match. /// public static Error PasswordsNotMatch => Error.Validation(description: nameof(PasswordsNotMatch)); /// /// Gets the error that reports that a time-based one-time password code is invalid. /// public static Error InvalidTotpCode => Error.Validation(description: nameof(InvalidTotpCode)); /// /// Gets the error that reports that the combination of a username and a password is invalid. /// public static Error InvalidUsernameOrPassword => Error.Failure(description: nameof(InvalidUsernameOrPassword)); /// /// Gets the error that reports that a current password is invalid. /// public static Error InvalidCurrentPassword => Error.Failure(description: nameof(InvalidCurrentPassword)); /// /// Gets the error that reports that a temporary password has expired. /// public static Error TempPasswordExpired => Error.Failure(description: nameof(TempPasswordExpired)); /// /// Gets the error that reports that a password reset has already been requested. /// public static Error PasswordResetAlreadyRequested => Error.Failure(description: nameof(PasswordResetAlreadyRequested)); } }