summaryrefslogtreecommitdiffstats
path: root/extensions/Persona
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-09-01 07:01:20 +0200
committerByron Jones <glob@mozilla.com>2015-09-01 07:01:20 +0200
commit421ff7f194875db9634ea783d9dd5b6111f19df3 (patch)
tree5806e9f3001fa4f33ba85aa94856b70a7f878cf8 /extensions/Persona
parentbcc93f83a64a76cd73501eaefaf5fd073fbc3f0d (diff)
downloadbugzilla-421ff7f194875db9634ea783d9dd5b6111f19df3.tar.gz
bugzilla-421ff7f194875db9634ea783d9dd5b6111f19df3.tar.xz
Bug 1197073 - add support for 2fa using totp (eg. google authenticator)
Diffstat (limited to 'extensions/Persona')
-rw-r--r--extensions/Persona/lib/Login.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/extensions/Persona/lib/Login.pm b/extensions/Persona/lib/Login.pm
index ece92a3c0..c2f8caf2b 100644
--- a/extensions/Persona/lib/Login.pm
+++ b/extensions/Persona/lib/Login.pm
@@ -98,6 +98,12 @@ sub get_login_info {
user_error => 'persona_account_too_powerful' };
}
+ if ($user->mfa) {
+ return { failure => AUTH_ERROR,
+ user_error => 'mfa_prevents_login',
+ details => { provider => 'Persona' } };
+ }
+
$login_data->{'user'} = $user;
$login_data->{'user_id'} = $user->id;