fix: definitions for accountLockout and passwordPolicy (#7040)
* fix: definitions for accountLockout and passwordPolicy * redo env prefix
This commit is contained in:
@@ -128,9 +128,9 @@ export interface ParseServerOptions {
|
||||
:DEFAULT: false */
|
||||
emailVerifyTokenReuseIfValid: ?boolean;
|
||||
/* account lockout policy for failed login attempts */
|
||||
accountLockout: ?any;
|
||||
accountLockout: ?AccountLockoutOptions;
|
||||
/* Password policy for enforcing password related rules */
|
||||
passwordPolicy: ?any;
|
||||
passwordPolicy: ?PasswordPolicyOptions;
|
||||
/* Adapter module for the cache */
|
||||
cacheAdapter: ?Adapter<CacheAdapter>;
|
||||
/* Adapter module for email sending */
|
||||
@@ -291,3 +291,27 @@ export interface IdempotencyOptions {
|
||||
:DEFAULT: 300 */
|
||||
ttl: ?number;
|
||||
}
|
||||
|
||||
export interface AccountLockoutOptions {
|
||||
/* number of minutes that a locked-out account remains locked out before automatically becoming unlocked. */
|
||||
duration: ?number;
|
||||
/* number of failed sign-in attempts that will cause a user account to be locked */
|
||||
threshold: ?number;
|
||||
}
|
||||
|
||||
export interface PasswordPolicyOptions {
|
||||
/* a RegExp object or a regex string representing the pattern to enforce */
|
||||
validatorPattern: ?string;
|
||||
/* a callback function to be invoked to validate the password */
|
||||
validatorCallback: ?() => void;
|
||||
/* disallow username in passwords */
|
||||
doNotAllowUsername: ?boolean;
|
||||
/* days for password expiry */
|
||||
maxPasswordAge: ?number;
|
||||
/* setting to prevent reuse of previous n passwords */
|
||||
maxPasswordHistory: ?number;
|
||||
/* time for token to expire */
|
||||
resetTokenValidityDuration: ?number;
|
||||
/* resend token if it's still valid */
|
||||
resetTokenReuseIfValid: ?boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user