add support for organization duo 2fa

This commit is contained in:
Kyle Spearrin 2018-04-03 15:27:36 -04:00
parent 393f178242
commit 7e1450f581
5 changed files with 20 additions and 6 deletions

2
jslib

@ -1 +1 @@
Subproject commit bdbb01317d6b41a9c0f74d47bf89e8ed11631fdc
Subproject commit 167558168c4ddff8eff67d7f12dfac47d5d25866

View File

@ -720,6 +720,10 @@
"message": "Verify with Duo Security using the Duo Mobile app, SMS, phone call, or U2F security key.",
"description": "'Duo Security' and 'Duo Mobile' are product names and should not be translated."
},
"duoOrganizationDesc": {
"message": "Verify with Duo Security for your organization using the Duo Mobile app, SMS, phone call, or U2F security key.",
"description": "'Duo Security' and 'Duo Mobile' are product names and should not be translated."
},
"u2fDesc": {
"message": "Use any FIDO U2F enabled security key to access your account."
},
@ -1026,5 +1030,9 @@
},
"toggleOptions": {
"message": "Toggle Options"
},
"organization": {
"message": "Organization",
"description": "An entity of multiple related people (ex. a team or business organization)."
}
}

View File

@ -127,8 +127,6 @@ angular
});
$scope.$on('2faPageResponse', (event, details) => {
console.log('got 2fa response');
console.log(details);
if (details.type === 'duo') {
$scope.login(details.data.sigValue, details.tab);
}
@ -145,7 +143,8 @@ angular
}
var params = providers.get($scope.providerType);
if ($scope.providerType === constants.twoFactorProvider.duo) {
if ($scope.providerType === constants.twoFactorProvider.duo ||
$scope.providerType === constants.twoFactorProvider.organizationDuo) {
if (platformUtilsService.isSafari()) {
var tab = BrowserApi.createNewTab(BrowserApi.getAssetUrl('2fa/index.html'));
var tabToSend = BrowserApi.makeTabObject(tab);

View File

@ -11,6 +11,9 @@ angular
$scope.providers = [];
if (providers.get(constants.twoFactorProvider.organizationDuo)) {
add(constants.twoFactorProvider.organizationDuo);
}
if (providers.get(constants.twoFactorProvider.authenticator)) {
add(constants.twoFactorProvider.authenticator);
}

View File

@ -44,12 +44,16 @@
</div>
</form>
<form name="theForm" bit-form="loginPromise" ng-if="providerType === constantsProvider.duo" autocomplete="off">
<form name="theForm" bit-form="loginPromise" ng-if="providerType === constantsProvider.duo ||
providerType === constantsProvider.organizationDuo" autocomplete="off">
<div class="header">
<div class="left">
<a ui-sref="login({animation: 'out-slide-right'})"><i class="fa fa-chevron-left"></i> {{i18n.back}}</a>
</div>
<div class="title">Duo</div>
<div class="title">
Duo
<span ng-if="providerType === constantsProvider.organizationDuo">({{i18n.organization}})</span>
</div>
</div>
<div class="content">
<div id="duoFrameWrapper" ng-if="!showNewWindowMessage">