LT-97: Add requireRegexValidation and requireStrongPasswords properties under passwordOptions which is under passwordOptions.

- requireRegexValidation toggles whether or not password validation is controlled by regular expression
- requireStrongPasswords toggles whether password validation is controlled by zxcvbn package
LT-104: User account shall be locked after 5 failed attempts
- "failedAttemptsLimit" property which is under passwordOptions in ActiveEntry configuration object sets number of failed attempts count to lock user account, it is set 5 as default
LT-99: Passwords shall use password history of 6
- "passwordHistoryCount" property which is under passwordOptions in ActiveEntry configuration object sets count of last passwords that is not used to reset password
- Show error messages in changePassword template
- Make signIn button disabled if inputs are not validated
This commit is contained in:
Aysel Afsar committed 2016-02-14 17:03:00 -05:00
1 parent 24e615da1e
commit eb32e1771f
15 files changed
+250 -49

No files matched your search

@@ -65,8 +65,8 @@ Template.entrySignIn.helpers({
return "border: 1px solid gray";
}
}
});
});
//==================================================================================================
// COMPONENT OUTPUTS
@@ -90,24 +90,28 @@ Template.entrySignIn.events({
ActiveEntry.verifyEmail(email);
ActiveEntry.errorMessages.set('signInError', null);
setSignInButtonStyling();
},
'change input[name="email"]': function (event, template) {
var email = $('input[name="email"]').val();
ActiveEntry.verifyEmail(email);
ActiveEntry.errorMessages.set('signInError', null);
setSignInButtonStyling();
},
'keyup #signInPagePasswordInput': function (event, template) {
var password = $('input[name="password"]').val();
ActiveEntry.verifyPassword(password);
ActiveEntry.errorMessages.set('signInError', null);
setSignInButtonStyling();
},
'change #signInPagePasswordInput': function (event, template) {
var password = $('input[name="password"]').val();
ActiveEntry.verifyPassword(password);
ActiveEntry.errorMessages.set('signInError', null);
setSignInButtonStyling();
},
// 'submit': function (event, template) {
// event.preventDefault();
@@ -128,13 +132,7 @@ Template.entrySignIn.events({
},
'keyup #entrySignIn': function(event, template) {
if(event.keyCode == 13) {
ActiveEntry.verifyEmail($("#signInPageEmailInput").val());
if (!ActiveEntry.errorMessages.get('signInError') &&
ActiveEntry.successMessages.get('email') &&
$("#signInPagePasswordInput").val()) {
$("#signInToAppButton").click();
}
$("#signInToAppButton").click();
}
}
});
@@ -142,3 +140,18 @@ Template.entrySignIn.events({
//==================================================================================================
// Sets SignInButton Styling according to email and password fields
function setSignInButtonStyling() {
var signInToAppButton = $("#signInToAppButton");
if ($("#signInPagePasswordInput").val() && ActiveEntry.successMessages.get('email')) {
// Set button as enable
signInToAppButton.removeClass("disabledButton");
signInToAppButton.attr("disabled", false);
} else {
signInToAppButton.addClass("disabledButton");
signInToAppButton.attr("disabled", true);
}
}