added org duo to 2fa flow
This commit is contained in:
parent
551217ea38
commit
3643222b3c
|
@ -216,8 +216,9 @@ angular
|
|||
function init() {
|
||||
stopU2fCheck = true;
|
||||
var params;
|
||||
if ($scope.twoFactorProvider === constants.twoFactorProvider.duo) {
|
||||
params = $scope.twoFactorProviders[constants.twoFactorProvider.duo];
|
||||
if ($scope.twoFactorProvider === constants.twoFactorProvider.duo ||
|
||||
$scope.twoFactorProvider === constants.twoFactorProvider.organizationDuo) {
|
||||
params = $scope.twoFactorProviders[$scope.twoFactorProvider];
|
||||
|
||||
$window.Duo.init({
|
||||
host: params.Host,
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
|
||||
$scope.providers = [];
|
||||
|
||||
if (providers.hasOwnProperty(constants.twoFactorProvider.organizationDuo)) {
|
||||
add(constants.twoFactorProvider.organizationDuo);
|
||||
}
|
||||
if (providers.hasOwnProperty(constants.twoFactorProvider.authenticator)) {
|
||||
add(constants.twoFactorProvider.authenticator);
|
||||
}
|
||||
|
|
|
@ -83,7 +83,8 @@
|
|||
</form>
|
||||
</div>
|
||||
|
||||
<div ng-if="twoFactorProvider === twoFactorProviderConstants.duo">
|
||||
<div ng-if="twoFactorProvider === twoFactorProviderConstants.duo ||
|
||||
twoFactorProvider === twoFactorProviderConstants.organizationDuo">
|
||||
<p class="login-box-msg">
|
||||
Complete logging in with Duo.
|
||||
</p>
|
||||
|
|
|
@ -106,7 +106,8 @@ angular.module('bit')
|
|||
image: 'authapp.png',
|
||||
displayOrder: 0,
|
||||
priority: 1,
|
||||
requiresUsb: false
|
||||
requiresUsb: false,
|
||||
organization: false
|
||||
},
|
||||
{
|
||||
type: 3,
|
||||
|
@ -117,7 +118,8 @@ angular.module('bit')
|
|||
image: 'yubico.png',
|
||||
displayOrder: 1,
|
||||
priority: 3,
|
||||
requiresUsb: true
|
||||
requiresUsb: true,
|
||||
organization: false
|
||||
},
|
||||
{
|
||||
type: 2,
|
||||
|
@ -128,7 +130,8 @@ angular.module('bit')
|
|||
image: 'duo.png',
|
||||
displayOrder: 2,
|
||||
priority: 2,
|
||||
requiresUsb: false
|
||||
requiresUsb: false,
|
||||
organization: false
|
||||
},
|
||||
{
|
||||
type: 4,
|
||||
|
@ -139,7 +142,8 @@ angular.module('bit')
|
|||
image: 'fido.png',
|
||||
displayOrder: 3,
|
||||
priority: 4,
|
||||
requiresUsb: true
|
||||
requiresUsb: true,
|
||||
organization: false
|
||||
},
|
||||
{
|
||||
type: 1,
|
||||
|
@ -151,20 +155,21 @@ angular.module('bit')
|
|||
image: 'gmail.png',
|
||||
displayOrder: 4,
|
||||
priority: 0,
|
||||
requiresUsb: false
|
||||
}
|
||||
],
|
||||
orgTwoFactorProviderInfo: [
|
||||
requiresUsb: false,
|
||||
organization: false
|
||||
},
|
||||
{
|
||||
type: 6,
|
||||
name: 'Duo',
|
||||
description: 'Verify with Duo Security using the Duo Mobile app, SMS, phone call, or U2F security key.',
|
||||
name: 'Duo (Organization)',
|
||||
description: 'Verify with Duo Security for your organization using the Duo Mobile app, SMS, ' +
|
||||
'phone call, or U2F security key.',
|
||||
enabled: false,
|
||||
active: true,
|
||||
image: 'duo.png',
|
||||
displayOrder: 1,
|
||||
priority: 0,
|
||||
requiresUsb: false
|
||||
priority: 10,
|
||||
requiresUsb: false,
|
||||
organization: true
|
||||
}
|
||||
],
|
||||
plans: {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
$analytics, appSettings, constants, $filter) {
|
||||
$scope.selfHosted = appSettings.selfHosted;
|
||||
$scope.model = {};
|
||||
$scope.twoStepProviders = constants.orgTwoFactorProviderInfo;
|
||||
$scope.twoStepProviders = $filter('filter')(constants.twoFactorProviderInfo, { organization: true });
|
||||
$scope.use2fa = false;
|
||||
|
||||
$scope.$on('$viewContentLoaded', function () {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
.controller('settingsTwoStepController', function ($scope, apiService, toastr, $analytics, constants,
|
||||
$filter, $uibModal, authService) {
|
||||
$scope.providers = constants.twoFactorProviderInfo;
|
||||
$scope.providers = $filter('filter')(constants.twoFactorProviderInfo, { organization: false });
|
||||
$scope.premium = true;
|
||||
|
||||
authService.getUserProfile().then(function (profile) {
|
||||
|
|
Loading…
Reference in New Issue