From bea9e06506424ba07764f68eaaaa9161a12da767 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 3 Apr 2018 15:11:03 -0400 Subject: [PATCH] added 2fa support for org duo --- src/enums/twoFactorProviderType.ts | 1 + src/services/auth.service.ts | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/enums/twoFactorProviderType.ts b/src/enums/twoFactorProviderType.ts index 9d767ae026..f866295c3b 100644 --- a/src/enums/twoFactorProviderType.ts +++ b/src/enums/twoFactorProviderType.ts @@ -5,4 +5,5 @@ export enum TwoFactorProviderType { Yubikey = 3, U2f = 4, Remember = 5, + OrganizationDuo = 6, } diff --git a/src/services/auth.service.ts b/src/services/auth.service.ts index a360dc1c1d..7395e7c420 100644 --- a/src/services/auth.service.ts +++ b/src/services/auth.service.ts @@ -51,6 +51,12 @@ export const TwoFactorProviders = { description: null as string, priority: 0, }, + [TwoFactorProviderType.OrganizationDuo]: { + type: TwoFactorProviderType.OrganizationDuo, + name: 'Duo (Organization)', + description: null as string, + priority: 10, + }, }; export class AuthService { @@ -76,6 +82,11 @@ export class AuthService { TwoFactorProviders[TwoFactorProviderType.Duo].description = this.i18nService.t('duoDesc'); + TwoFactorProviders[TwoFactorProviderType.OrganizationDuo].name = + 'Duo (' + this.i18nService.t('organization') + ')'; + TwoFactorProviders[TwoFactorProviderType.OrganizationDuo].description = + this.i18nService.t('duoOrganizationDesc'); + TwoFactorProviders[TwoFactorProviderType.U2f].name = this.i18nService.t('u2fTitle'); TwoFactorProviders[TwoFactorProviderType.U2f].description = this.i18nService.t('u2fDesc');