| | | 1 | | namespace Anichron.API.Infrastructure; |
| | | 2 | | |
| | | 3 | | internal static class AuthMessages |
| | | 4 | | { |
| | | 5 | | internal const string InvalidUsername = "The provided username is not valid."; |
| | | 6 | | internal const string UsernameTaken = "Username is already taken."; |
| | | 7 | | internal const string EmailTaken = "An account with this email already exists."; |
| | | 8 | | internal const string InvalidEmail = "The provided email address is not valid."; |
| | | 9 | | internal const string PasswordPwned = "This password has appeared in a known data breach. Please choose a different |
| | | 10 | | internal const string InvalidCredentials = "The username, email, or password is incorrect."; |
| | | 11 | | internal const string AccountDisabled = "This account has been disabled. Please contact an administrator."; |
| | | 12 | | internal const string MustChangePassword = "Password change required before continuing."; |
| | | 13 | | |
| | 3 | 14 | | internal static string AccountTemporarilyLocked(int secondsRemaining) => $"Too many failed login attempts. Please tr |
| | | 15 | | internal const string RefreshTokenRequired = "Refresh token is required."; |
| | | 16 | | internal const string RefreshTokenInvalid = "Refresh token is invalid or has expired."; |
| | | 17 | | internal const string TooManyRequests = "Too many requests. Please try again later."; |
| | | 18 | | internal const string RefreshTokenCookieName = "refresh_token"; |
| | | 19 | | internal const string InviteTokenInvalid = "The invite token is invalid, expired, or has already been used."; |
| | | 20 | | internal const string CannotModifySelf = "You cannot modify your own account."; |
| | | 21 | | internal const string PathAlreadyAssigned = "This root path is already assigned to a storage config."; |
| | | 22 | | internal const string PathInvalid = "The root path cannot be empty or whitespace."; |
| | | 23 | | } |
| | | 24 | | |
| | | 25 | | internal static class AuthRateLimitPolicies |
| | | 26 | | { |
| | | 27 | | internal const string Sensitive = "auth-sensitive"; |
| | | 28 | | internal const string Refresh = "auth-refresh"; |
| | | 29 | | } |