You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var_createClass=function(){functiondefineProperties(target,props){for(vari=0;i<props.length;i++){vardescriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"indescriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}returnfunction(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);returnConstructor;};}();// This class handles the Account Lockout Policy settings.
reject(newParse.Error(Parse.Error.OBJECT_NOT_FOUND,'Your account is locked due to multiple failed login attempts. Please try again after '+_this4._config.accountLockout.duration+' minute(s)'));
171
+
}else{
172
+
resolve();
173
+
}
174
+
}).catch(function(err){
175
+
reject(err);
176
+
});
177
+
});
178
+
}
179
+
180
+
/**
181
+
* set and/or increment _failed_login_count
182
+
* if _failed_login_count > threshold
183
+
* set the _account_lockout_expires_at to current_time + accountPolicy.duration
184
+
* else
185
+
* do nothing
186
+
*/
187
+
188
+
},{
189
+
key: '_handleFailedLoginAttempt',
190
+
value: function_handleFailedLoginAttempt(){
191
+
var_this5=this;
192
+
193
+
returnnewPromise(function(resolve,reject){
194
+
_this5._initFailedLoginCount().then(function(){
195
+
return_this5._incrementFailedLoginCount();
196
+
}).then(function(){
197
+
return_this5._setLockoutExpiration();
198
+
}).then(function(){
199
+
resolve();
200
+
}).catch(function(err){
201
+
reject(err);
202
+
});
203
+
});
204
+
}
205
+
206
+
/**
207
+
* handle login attempt if the Account Lockout Policy is enabled
0 commit comments