DJIN#36213 SAML/Authenticatie verbeteringen. Betere success-na-lockout handling

svn path=/Website/trunk/; revision=33465
This commit is contained in:
Jos Groot Lipman
2017-04-12 09:07:23 +00:00
parent 3a7c639057
commit ede78d7fcc

View File

@@ -588,8 +588,11 @@ function getIdentity(username, wachtwoord, params)
{
var dtRetry = new Date();
dtRetry.setMinutes(dtRetry.getMinutes() + S("prs_login_lockout_expire"));
if (lockdata.count == S("prs_login_attempts") + 1) // Alleen eerste keer loggen
__DoLog("Meer dan {0} inlogpogingen voor {1}".format(S("prs_login_attempts"), username), "#FF0000");
if (lockdata.count == S("prs_login_attempts") + 1 // Alleen eerste keer loggen
|| Application("otap_environment") == "O") // Maar altijd op OTAP
{
__DoLog("Meer ({0}) dan {1} inlogpogingen voor {2}".format(lockdata.count, S("prs_login_attempts"), username), "#FF0000");
}
result.fail_reason = L("lcl_prs_login_lockout").format(username, toISODateTimeString(dtRetry));
return result;
}
@@ -664,7 +667,7 @@ function getIdentity(username, wachtwoord, params)
oRs.Close();
if (user_key > 0)
if (result.user_key > 0)
{ // Success! Wis eventuele lockout
Application.Lock();
var lockout = myJSON.parse(Application(lockout_name) || "[]");
@@ -698,7 +701,6 @@ function getIdentity(username, wachtwoord, params)
// - prs_perslid_authenticatie (en prs_perslid_authenticatie_exp > sysdate)
// de laatste wordt gebruikt voor mobile/SMS
function tryLogin(username, wachtwoord, params)
{
params = params || {};