summaryrefslogtreecommitdiffstats
path: root/Bugzilla/User.pm
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-10-12 18:49:00 +0200
committerByron Jones <glob@mozilla.com>2015-10-12 18:49:00 +0200
commitd69cebd8c703f0a1f6839944f1c949bce350b02e (patch)
tree0c38317335ffe054597a56e281160fb7bcc8ebfb /Bugzilla/User.pm
parent07791e2b9be26347cd3e7bbb8a5f004211841908 (diff)
downloadbugzilla-d69cebd8c703f0a1f6839944f1c949bce350b02e.tar.gz
bugzilla-d69cebd8c703f0a1f6839944f1c949bce350b02e.tar.xz
Bug 1199089 - add support for duo-security
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r--Bugzilla/User.pm10
1 files changed, 3 insertions, 7 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index 6678e6171..d2de6b548 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -368,6 +368,7 @@ sub _check_mfa {
my ($self, $provider) = @_;
$provider = lc($provider // '');
return 'TOTP' if $provider eq 'totp';
+ return 'Duo' if $provider eq 'duo';
return '';
}
@@ -586,13 +587,8 @@ sub mfa_provider {
my ($self) = @_;
my $mfa = $self->{mfa} || return undef;
return $self->{mfa_provider} if exists $self->{mfa_provider};
- if ($mfa eq 'TOTP') {
- require Bugzilla::MFA::TOTP;
- $self->{mfa_provider} = Bugzilla::MFA::TOTP->new($self);
- }
- else {
- $self->{mfa_provider} = undef;
- }
+ require Bugzilla::MFA;
+ $self->{mfa_provider} = Bugzilla::MFA->new_from($self, $mfa);
return $self->{mfa_provider};
}