public AuthService(
     ISecureStorageService secureStorage,
     ITokenService tokenService,
     ISettings settings,
     IAppSettingsService appSettingsService,
     ICryptoService cryptoService,
     IConnectApiRepository connectApiRepository,
     IAccountsApiRepository accountsApiRepository,
     IAppIdService appIdService,
     IDeviceInfoService deviceInfoService,
     IDeviceApiRepository deviceApiRepository,
     IGoogleAnalyticsService googleAnalyticsService)
 {
     _secureStorage          = secureStorage;
     _tokenService           = tokenService;
     _settings               = settings;
     _appSettingsService     = appSettingsService;
     _cryptoService          = cryptoService;
     _connectApiRepository   = connectApiRepository;
     _accountsApiRepository  = accountsApiRepository;
     _appIdService           = appIdService;
     _deviceInfoService      = deviceInfoService;
     _deviceApiRepository    = deviceApiRepository;
     _googleAnalyticsService = googleAnalyticsService;
 }
Beispiel #2
0
 public AppCenterHelper(
     IAppIdService appIdService,
     IStateService stateService)
 {
     _appIdService = appIdService;
     _stateService = stateService;
 }
Beispiel #3
0
 public HockeyAppCrashManagerDelegate(
     IAppIdService appIdService,
     IAuthService authService)
 {
     _appIdService = appIdService;
     _authService  = authService;
 }
 public HockeyAppCrashManagerListener(
     IAppIdService appIdService,
     IUserService userService)
 {
     _appIdService = appIdService;
     _userService  = userService;
 }
 public HockeyAppCrashManagerListener(
     IAppIdService appIdService,
     IAuthService authService)
 {
     _appIdService = appIdService;
     _authService  = authService;
 }
 public AppCenterHelper(
     IAppIdService appIdService,
     IUserService userService)
 {
     _appIdService = appIdService;
     _userService  = userService;
 }
Beispiel #7
0
 public HockeyAppCrashManagerDelegate(
     IAppIdService appIdService,
     IUserService userService)
 {
     _appIdService = appIdService;
     _userService  = userService;
 }
        public GoogleAnalyticsService(
            IAppIdService appIdService,
            IAuthService authService)
        {
            _authService = authService;

            Gai.SharedInstance.DispatchInterval        = 10;
            Gai.SharedInstance.TrackUncaughtExceptions = true;
            _tracker = Gai.SharedInstance.GetTracker("UA-81915606-1");
            _tracker.SetAllowIdfaCollection(true);
            _tracker.Set(GaiConstants.ClientId, appIdService.AnonymousAppId);
        }
Beispiel #9
0
        public LoginTwoFactorPage()
            : base(updateActivity: false)
        {
            _cryptoService     = Resolver.Resolve <ICryptoService>();
            _authService       = Resolver.Resolve <IAuthService>();
            _deviceInfoService = Resolver.Resolve <IDeviceInfoService>();
            _appIdService      = Resolver.Resolve <IAppIdService>();
            _userDialogs       = Resolver.Resolve <IUserDialogs>();
            _syncService       = Resolver.Resolve <ISyncService>();

            Init();
        }
Beispiel #10
0
 private void Resolve()
 {
     if (_resolved)
     {
         return;
     }
     _syncService      = ServiceContainer.Resolve <ISyncService>("syncService");
     _stateService     = ServiceContainer.Resolve <IStateService>("stateService");
     _appIdService     = ServiceContainer.Resolve <IAppIdService>("appIdService");
     _apiService       = ServiceContainer.Resolve <IApiService>("apiService");
     _messagingService = ServiceContainer.Resolve <IMessagingService>("messagingService");
     _resolved         = true;
 }
Beispiel #11
0
 public PushNotificationListener(
     ISyncService syncService,
     IDeviceApiRepository deviceApiRepository,
     IAuthService authService,
     IAppIdService appIdService,
     ISettings settings)
 {
     _syncService         = syncService;
     _deviceApiRepository = deviceApiRepository;
     _authService         = authService;
     _appIdService        = appIdService;
     _settings            = settings;
 }
        public GoogleAnalyticsService(
            IAppIdService appIdService,
            ISettings settings)
        {
            Gai.SharedInstance.DispatchInterval        = 10;
            Gai.SharedInstance.TrackUncaughtExceptions = false;
            _tracker = Gai.SharedInstance.GetTracker("UA-81915606-1");
            _tracker.SetAllowIdfaCollection(true);
            _tracker.Set(GaiConstants.ClientId, appIdService.AnonymousAppId);

            var gaOptOut = settings.GetValueOrDefault(App.Constants.SettingGaOptOut, false);

            SetAppOptOut(gaOptOut);
        }
        private void Resolve()
        {
            if (_resolved)
            {
                return;
            }

            _syncService         = Resolver.Resolve <ISyncService>();
            _deviceApiRepository = Resolver.Resolve <IDeviceApiRepository>();
            _authService         = Resolver.Resolve <IAuthService>();
            _appIdService        = Resolver.Resolve <IAppIdService>();
            _settings            = Resolver.Resolve <ISettings>();

            _resolved = true;
        }
        public GoogleAnalyticsService(
            Context appContext,
            IAppIdService appIdService,
            IAuthService authService)
        {
            _authService = authService;

            _instance = GoogleAnalytics.GetInstance(appContext.ApplicationContext);
            _instance.SetLocalDispatchPeriod(10);

            _tracker = _instance.NewTracker("UA-81915606-2");
            _tracker.EnableExceptionReporting(true);
            _tracker.EnableAdvertisingIdCollection(true);
            _tracker.EnableAutoActivityTracking(true);
            _tracker.SetClientId(appIdService.AnonymousAppId);
        }
Beispiel #15
0
        public LoginPage(string email = null)
            : base(updateActivity: false)
        {
            _email                  = email;
            _cryptoService          = Resolver.Resolve <ICryptoService>();
            _authService            = Resolver.Resolve <IAuthService>();
            _deviceInfoService      = Resolver.Resolve <IDeviceInfoService>();
            _appIdService           = Resolver.Resolve <IAppIdService>();
            _userDialogs            = Resolver.Resolve <IUserDialogs>();
            _syncService            = Resolver.Resolve <ISyncService>();
            _settings               = Resolver.Resolve <ISettings>();
            _googleAnalyticsService = Resolver.Resolve <IGoogleAnalyticsService>();
            _pushNotification       = Resolver.Resolve <IPushNotification>();

            Init();
        }
        public TwoFactorPageViewModel()
        {
            _deviceActionService  = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");
            _authService          = ServiceContainer.Resolve <IAuthService>("authService");
            _syncService          = ServiceContainer.Resolve <ISyncService>("syncService");
            _apiService           = ServiceContainer.Resolve <IApiService>("apiService");
            _platformUtilsService = ServiceContainer.Resolve <IPlatformUtilsService>("platformUtilsService");
            _environmentService   = ServiceContainer.Resolve <IEnvironmentService>("environmentService");
            _messagingService     = ServiceContainer.Resolve <IMessagingService>("messagingService");
            _broadcasterService   = ServiceContainer.Resolve <IBroadcasterService>("broadcasterService");
            _stateService         = ServiceContainer.Resolve <IStateService>("stateService");
            _i18nService          = ServiceContainer.Resolve <II18nService>("i18nService");
            _appIdService         = ServiceContainer.Resolve <IAppIdService>("appIdService");

            PageTitle     = AppResources.TwoStepLogin;
            SubmitCommand = new Command(async() => await SubmitAsync());
        }
        public GoogleAnalyticsService(
            Context appContext,
            IAppIdService appIdService,
            ISettings settings)
        {
            _instance = GoogleAnalytics.GetInstance(appContext.ApplicationContext);
            _instance.SetLocalDispatchPeriod(10);

            _tracker = _instance.NewTracker("UA-81915606-2");
            _tracker.EnableExceptionReporting(false);
            _tracker.EnableAdvertisingIdCollection(true);
            _tracker.EnableAutoActivityTracking(true);
            _tracker.SetClientId(appIdService.AnonymousAppId);

            var gaOptOut = settings.GetValueOrDefault(Constants.SettingGaOptOut, false);

            SetAppOptOut(gaOptOut);
        }
Beispiel #18
0
        public LoginTwoFactorPage(string email, string masterPasswordHash, byte[] key)
            : base(updateActivity: false)
        {
            _email = email;
            _masterPasswordHash = masterPasswordHash;
            _key = key;

            _cryptoService          = Resolver.Resolve <ICryptoService>();
            _authService            = Resolver.Resolve <IAuthService>();
            _tokenService           = Resolver.Resolve <ITokenService>();
            _deviceInfoService      = Resolver.Resolve <IDeviceInfoService>();
            _appIdService           = Resolver.Resolve <IAppIdService>();
            _userDialogs            = Resolver.Resolve <IUserDialogs>();
            _syncService            = Resolver.Resolve <ISyncService>();
            _settings               = Resolver.Resolve <ISettings>();
            _googleAnalyticsService = Resolver.Resolve <IGoogleAnalyticsService>();
            _pushNotification       = Resolver.Resolve <IPushNotification>();

            Init();
        }
Beispiel #19
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            var eventUploadIntent = new Intent(this, typeof(EventUploadReceiver));

            _eventUploadPendingIntent = PendingIntent.GetBroadcast(this, 0, eventUploadIntent,
                                                                   PendingIntentFlags.UpdateCurrent);
            var alarmIntent = new Intent(this, typeof(LockAlarmReceiver));

            _vaultTimeoutAlarmPendingIntent = PendingIntent.GetBroadcast(this, 0, alarmIntent,
                                                                         PendingIntentFlags.UpdateCurrent);
            var clearClipboardIntent = new Intent(this, typeof(ClearClipboardAlarmReceiver));

            _clearClipboardPendingIntent = PendingIntent.GetBroadcast(this, 0, clearClipboardIntent,
                                                                      PendingIntentFlags.UpdateCurrent);

            var policy = new StrictMode.ThreadPolicy.Builder().PermitAll().Build();

            StrictMode.SetThreadPolicy(policy);

            _deviceActionService = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");
            _messagingService    = ServiceContainer.Resolve <IMessagingService>("messagingService");
            _broadcasterService  = ServiceContainer.Resolve <IBroadcasterService>("broadcasterService");
            _userService         = ServiceContainer.Resolve <IUserService>("userService");
            _appIdService        = ServiceContainer.Resolve <IAppIdService>("appIdService");
            _storageService      = ServiceContainer.Resolve <IStorageService>("storageService");
            _eventService        = ServiceContainer.Resolve <IEventService>("eventService");

            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            UpdateTheme(ThemeManager.GetTheme(true));
            base.OnCreate(savedInstanceState);
            if (!CoreHelpers.InDebugMode())
            {
                Window.AddFlags(Android.Views.WindowManagerFlags.Secure);
            }

#if !FDROID
            var appCenterHelper = new AppCenterHelper(_appIdService, _userService);
            var appCenterTask   = appCenterHelper.InitAsync();
#endif

            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            Xamarin.Forms.Forms.Init(this, savedInstanceState);
            _appOptions = GetOptions();
            LoadApplication(new App.App(_appOptions));

            _broadcasterService.Subscribe(_activityKey, (message) =>
            {
                if (message.Command == "scheduleVaultTimeoutTimer")
                {
                    var alarmManager        = GetSystemService(AlarmService) as AlarmManager;
                    var vaultTimeoutMinutes = (int)message.Data;
                    var vaultTimeoutMs      = vaultTimeoutMinutes * 60000;
                    var triggerMs           = Java.Lang.JavaSystem.CurrentTimeMillis() + vaultTimeoutMs + 10;
                    alarmManager.Set(AlarmType.RtcWakeup, triggerMs, _vaultTimeoutAlarmPendingIntent);
                }
                else if (message.Command == "cancelVaultTimeoutTimer")
                {
                    var alarmManager = GetSystemService(AlarmService) as AlarmManager;
                    alarmManager.Cancel(_vaultTimeoutAlarmPendingIntent);
                }
                else if (message.Command == "startEventTimer")
                {
                    StartEventAlarm();
                }
                else if (message.Command == "stopEventTimer")
                {
                    var task = StopEventAlarmAsync();
                }
                else if (message.Command == "finishMainActivity")
                {
                    Xamarin.Forms.Device.BeginInvokeOnMainThread(() => Finish());
                }
                else if (message.Command == "listenFido2")                  // First time when FIDO2 two-factor is enable
                {
                    ListenFido2((Dictionary <string, object>)message.Data); // When is the first time token (JSON Data in string) received on two-factor is still valid for short time
                }
                else if (message.Command == "listenFido2TryAgain")          // When FIDO2 fails and the user want to try again
                {
                    ListenFido2();                                          // Old token is only valid once, so we don't send again the token because a new one needs to be requested
                }
                else if (message.Command == "listenYubiKeyOTP")
                {
                    ListenYubiKey((bool)message.Data);
                }
                else if (message.Command == "updatedTheme")
                {
                    RestartApp();
                }
                else if (message.Command == "exit")
                {
                    ExitApp();
                }
                else if (message.Command == "copiedToClipboard")
                {
                    var task = ClearClipboardAlarmAsync(message.Data as Tuple <string, int?, bool>);
                }
            });

            Fido2Service.INSTANCE.start(this); // Start FIDO2 Service with this Activity, for the FIDO2 to send events (Sucess, Failure, Complete) for this activity
        }
 public GoogleAnalyticsService(
     Context appContext,
     IAppIdService appIdService,
     ISettings settings)
 {
 }
 public DeviceRequest(IAppIdService appIdService, IDeviceInfoService deviceInfoService)
 {
     Identifier = appIdService.AppId;
     Name       = deviceInfoService.Model;
     Type       = Device.RuntimePlatform == Device.Android ? DeviceType.Android : DeviceType.iOS;
 }
Beispiel #22
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            var eventUploadIntent = new Intent(this, typeof(EventUploadReceiver));

            _eventUploadPendingIntent = PendingIntent.GetBroadcast(this, 0, eventUploadIntent,
                                                                   PendingIntentFlags.UpdateCurrent);
            var alarmIntent = new Intent(this, typeof(LockAlarmReceiver));

            _lockAlarmPendingIntent = PendingIntent.GetBroadcast(this, 0, alarmIntent,
                                                                 PendingIntentFlags.UpdateCurrent);
            var clearClipboardIntent = new Intent(this, typeof(ClearClipboardAlarmReceiver));

            _clearClipboardPendingIntent = PendingIntent.GetBroadcast(this, 0, clearClipboardIntent,
                                                                      PendingIntentFlags.UpdateCurrent);

            var policy = new StrictMode.ThreadPolicy.Builder().PermitAll().Build();

            StrictMode.SetThreadPolicy(policy);

            _deviceActionService = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");
            _messagingService    = ServiceContainer.Resolve <IMessagingService>("messagingService");
            _broadcasterService  = ServiceContainer.Resolve <IBroadcasterService>("broadcasterService");
            _userService         = ServiceContainer.Resolve <IUserService>("userService");
            _appIdService        = ServiceContainer.Resolve <IAppIdService>("appIdService");
            _storageService      = ServiceContainer.Resolve <IStorageService>("storageService");
            _eventService        = ServiceContainer.Resolve <IEventService>("eventService");

            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            UpdateTheme(ThemeManager.GetTheme(true));
            base.OnCreate(savedInstanceState);
            if (!CoreHelpers.InDebugMode())
            {
                Window.AddFlags(Android.Views.WindowManagerFlags.Secure);
            }

#if !FDROID
            var hockeyAppListener = new HockeyAppCrashManagerListener(_appIdService, _userService);
            var hockeyAppTask     = hockeyAppListener.InitAsync(this);
#endif

            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            Xamarin.Forms.Forms.Init(this, savedInstanceState);
            _appOptions = GetOptions();
            LoadApplication(new App.App(_appOptions));

            _broadcasterService.Subscribe(_activityKey, (message) =>
            {
                if (message.Command == "scheduleLockTimer")
                {
                    var alarmManager      = GetSystemService(AlarmService) as AlarmManager;
                    var lockOptionMinutes = (int)message.Data;
                    var lockOptionMs      = lockOptionMinutes * 60000;
                    var triggerMs         = Java.Lang.JavaSystem.CurrentTimeMillis() + lockOptionMs + 10;
                    alarmManager.Set(AlarmType.RtcWakeup, triggerMs, _lockAlarmPendingIntent);
                }
                else if (message.Command == "cancelLockTimer")
                {
                    var alarmManager = GetSystemService(AlarmService) as AlarmManager;
                    alarmManager.Cancel(_lockAlarmPendingIntent);
                }
                else if (message.Command == "startEventTimer")
                {
                    StartEventAlarm();
                }
                else if (message.Command == "stopEventTimer")
                {
                    var task = StopEventAlarmAsync();
                }
                else if (message.Command == "finishMainActivity")
                {
                    Xamarin.Forms.Device.BeginInvokeOnMainThread(() => Finish());
                }
                else if (message.Command == "listenYubiKeyOTP")
                {
                    ListenYubiKey((bool)message.Data);
                }
                else if (message.Command == "updatedTheme")
                {
                    RestartApp();
                }
                else if (message.Command == "exit")
                {
                    ExitApp();
                }
                else if (message.Command == "copiedToClipboard")
                {
                    var task = ClearClipboardAlarmAsync(message.Data as Tuple <string, int?, bool>);
                }
            });
        }
Beispiel #23
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            var eventUploadIntent = new Intent(this, typeof(EventUploadReceiver));

            _eventUploadPendingIntent = PendingIntent.GetBroadcast(this, 0, eventUploadIntent,
                                                                   PendingIntentFlags.UpdateCurrent);

            var policy = new StrictMode.ThreadPolicy.Builder().PermitAll().Build();

            StrictMode.SetThreadPolicy(policy);

            _deviceActionService = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");
            _messagingService    = ServiceContainer.Resolve <IMessagingService>("messagingService");
            _broadcasterService  = ServiceContainer.Resolve <IBroadcasterService>("broadcasterService");
            _stateService        = ServiceContainer.Resolve <IStateService>("stateService");
            _appIdService        = ServiceContainer.Resolve <IAppIdService>("appIdService");
            _eventService        = ServiceContainer.Resolve <IEventService>("eventService");

            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            // this needs to be called here before base.OnCreate(...)
            Intent?.Validate();

            base.OnCreate(savedInstanceState);
            if (!CoreHelpers.InDebugMode())
            {
                Window.AddFlags(Android.Views.WindowManagerFlags.Secure);
            }

#if !DEBUG && !FDROID
            var appCenterHelper = new AppCenterHelper(_appIdService, _stateService);
            var appCenterTask   = appCenterHelper.InitAsync();
#endif

            var toplayout = Window?.DecorView?.RootView;
            if (toplayout != null)
            {
                toplayout.FilterTouchesWhenObscured = true;
            }

            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            Xamarin.Forms.Forms.Init(this, savedInstanceState);
            _appOptions = GetOptions();
            LoadApplication(new App.App(_appOptions));

            _broadcasterService.Subscribe(_activityKey, (message) =>
            {
                if (message.Command == "startEventTimer")
                {
                    StartEventAlarm();
                }
                else if (message.Command == "stopEventTimer")
                {
                    var task = StopEventAlarmAsync();
                }
                else if (message.Command == "finishMainActivity")
                {
                    Xamarin.Forms.Device.BeginInvokeOnMainThread(() => Finish());
                }
                else if (message.Command == "listenYubiKeyOTP")
                {
                    ListenYubiKey((bool)message.Data);
                }
                else if (message.Command == "updatedTheme")
                {
                    Xamarin.Forms.Device.BeginInvokeOnMainThread(() => AppearanceAdjustments());
                }
                else if (message.Command == "exit")
                {
                    ExitApp();
                }
            });
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            var eventUploadIntent = new Intent(this, typeof(EventUploadReceiver));

            _eventUploadPendingIntent = PendingIntent.GetBroadcast(this, 0, eventUploadIntent,
                                                                   PendingIntentFlags.UpdateCurrent);
            var clearClipboardIntent = new Intent(this, typeof(ClearClipboardAlarmReceiver));

            _clearClipboardPendingIntent = PendingIntent.GetBroadcast(this, 0, clearClipboardIntent,
                                                                      PendingIntentFlags.UpdateCurrent);

            var policy = new StrictMode.ThreadPolicy.Builder().PermitAll().Build();

            StrictMode.SetThreadPolicy(policy);

            _deviceActionService = ServiceContainer.Resolve <IDeviceActionService>("deviceActionService");
            _messagingService    = ServiceContainer.Resolve <IMessagingService>("messagingService");
            _broadcasterService  = ServiceContainer.Resolve <IBroadcasterService>("broadcasterService");
            _userService         = ServiceContainer.Resolve <IUserService>("userService");
            _appIdService        = ServiceContainer.Resolve <IAppIdService>("appIdService");
            _storageService      = ServiceContainer.Resolve <IStorageService>("storageService");
            _eventService        = ServiceContainer.Resolve <IEventService>("eventService");

            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);
            if (!CoreHelpers.InDebugMode())
            {
                Window.AddFlags(Android.Views.WindowManagerFlags.Secure);
            }

#if !FDROID
            var appCenterHelper = new AppCenterHelper(_appIdService, _userService);
            var appCenterTask   = appCenterHelper.InitAsync();
#endif

            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            Xamarin.Forms.Forms.Init(this, savedInstanceState);
            _appOptions = GetOptions();
            LoadApplication(new App.App(_appOptions));

            _broadcasterService.Subscribe(_activityKey, (message) =>
            {
                if (message.Command == "startEventTimer")
                {
                    StartEventAlarm();
                }
                else if (message.Command == "stopEventTimer")
                {
                    var task = StopEventAlarmAsync();
                }
                else if (message.Command == "finishMainActivity")
                {
                    Xamarin.Forms.Device.BeginInvokeOnMainThread(() => Finish());
                }
                else if (message.Command == "listenYubiKeyOTP")
                {
                    ListenYubiKey((bool)message.Data);
                }
                else if (message.Command == "updatedTheme")
                {
                    Xamarin.Forms.Device.BeginInvokeOnMainThread(() => AppearanceAdjustments());
                }
                else if (message.Command == "exit")
                {
                    ExitApp();
                }
                else if (message.Command == "copiedToClipboard")
                {
                    var task = ClearClipboardAlarmAsync(message.Data as Tuple <string, int?, bool>);
                }
            });
        }
Beispiel #25
0
        public AuthService(
            ICryptoService cryptoService,
            IApiService apiService,
            IUserService userService,
            ITokenService tokenService,
            IAppIdService appIdService,
            II18nService i18nService,
            IPlatformUtilsService platformUtilsService,
            IMessagingService messagingService,
            ILockService lockService,
            bool setCryptoKeys = true)
        {
            _cryptoService        = cryptoService;
            _apiService           = apiService;
            _userService          = userService;
            _tokenService         = tokenService;
            _appIdService         = appIdService;
            _i18nService          = i18nService;
            _platformUtilsService = platformUtilsService;
            _messagingService     = messagingService;
            _lockService          = lockService;
            _setCryptoKeys        = setCryptoKeys;

            TwoFactorProviders = new Dictionary <TwoFactorProviderType, TwoFactorProvider>();
            TwoFactorProviders.Add(TwoFactorProviderType.Authenticator, new TwoFactorProvider
            {
                Type     = TwoFactorProviderType.Authenticator,
                Priority = 1,
                Sort     = 1
            });
            TwoFactorProviders.Add(TwoFactorProviderType.YubiKey, new TwoFactorProvider
            {
                Type     = TwoFactorProviderType.YubiKey,
                Priority = 3,
                Sort     = 2,
                Premium  = true
            });
            TwoFactorProviders.Add(TwoFactorProviderType.Duo, new TwoFactorProvider
            {
                Type     = TwoFactorProviderType.Duo,
                Name     = "Duo",
                Priority = 2,
                Sort     = 3,
                Premium  = true
            });
            TwoFactorProviders.Add(TwoFactorProviderType.OrganizationDuo, new TwoFactorProvider
            {
                Type     = TwoFactorProviderType.OrganizationDuo,
                Name     = "Duo (Organization)",
                Priority = 10,
                Sort     = 4
            });
            TwoFactorProviders.Add(TwoFactorProviderType.U2f, new TwoFactorProvider
            {
                Type     = TwoFactorProviderType.U2f,
                Priority = 4,
                Sort     = 5,
                Premium  = true
            });
            TwoFactorProviders.Add(TwoFactorProviderType.Email, new TwoFactorProvider
            {
                Type     = TwoFactorProviderType.Email,
                Priority = 0,
                Sort     = 6,
            });
        }
Beispiel #26
0
        public AuthService(
            ICryptoService cryptoService,
            ICryptoFunctionService cryptoFunctionService,
            IApiService apiService,
            IStateService stateService,
            ITokenService tokenService,
            IAppIdService appIdService,
            II18nService i18nService,
            IPlatformUtilsService platformUtilsService,
            IMessagingService messagingService,
            IVaultTimeoutService vaultTimeoutService,
            IKeyConnectorService keyConnectorService,
            bool setCryptoKeys = true)
        {
            _cryptoService         = cryptoService;
            _cryptoFunctionService = cryptoFunctionService;
            _apiService            = apiService;
            _stateService          = stateService;
            _tokenService          = tokenService;
            _appIdService          = appIdService;
            _i18nService           = i18nService;
            _platformUtilsService  = platformUtilsService;
            _messagingService      = messagingService;
            _keyConnectorService   = keyConnectorService;
            _setCryptoKeys         = setCryptoKeys;

            TwoFactorProviders = new Dictionary <TwoFactorProviderType, TwoFactorProvider>();
            TwoFactorProviders.Add(TwoFactorProviderType.Authenticator, new TwoFactorProvider
            {
                Type     = TwoFactorProviderType.Authenticator,
                Priority = 1,
                Sort     = 1
            });
            TwoFactorProviders.Add(TwoFactorProviderType.YubiKey, new TwoFactorProvider
            {
                Type     = TwoFactorProviderType.YubiKey,
                Priority = 3,
                Sort     = 2,
                Premium  = true
            });
            TwoFactorProviders.Add(TwoFactorProviderType.Duo, new TwoFactorProvider
            {
                Type     = TwoFactorProviderType.Duo,
                Name     = "Duo",
                Priority = 2,
                Sort     = 3,
                Premium  = true
            });
            TwoFactorProviders.Add(TwoFactorProviderType.OrganizationDuo, new TwoFactorProvider
            {
                Type     = TwoFactorProviderType.OrganizationDuo,
                Name     = "Duo (Organization)",
                Priority = 10,
                Sort     = 4
            });
            TwoFactorProviders.Add(TwoFactorProviderType.Fido2WebAuthn, new TwoFactorProvider
            {
                Type     = TwoFactorProviderType.Fido2WebAuthn,
                Priority = 4,
                Sort     = 5,
                Premium  = true
            });
            TwoFactorProviders.Add(TwoFactorProviderType.Email, new TwoFactorProvider
            {
                Type     = TwoFactorProviderType.Email,
                Priority = 0,
                Sort     = 6,
            });
        }
Beispiel #27
0
 public GoogleAnalyticsService(
     IAppIdService appIdService,
     ISettings settings)
 {
 }