Add two-factor authentication

- Add 2FA login interception in Session::setAuthenticatedForUser
- Add 2fa session variable holding the last auth code
This commit is contained in:
Hypolite Petovan 2019-05-13 01:36:09 -04:00
parent a7feb4bf9f
commit d7e9b91181
7 changed files with 194 additions and 0 deletions

View file

@ -186,6 +186,8 @@ class Session
}
}
Authentication::twoFactorCheck($user_record['uid'], $a);
if ($interactive) {
if ($user_record['login_date'] <= DBA::NULL_DATETIME) {
info(L10n::t('Welcome %s', $user_record['username']));