Exemple #1
0
 public OrganizationsController(
     IOrganizationRepository organizationRepository,
     IOrganizationUserRepository organizationUserRepository,
     IPolicyRepository policyRepository,
     IOrganizationService organizationService,
     IUserService userService,
     IPaymentService paymentService,
     ICurrentContext currentContext,
     ISsoConfigRepository ssoConfigRepository,
     ISsoConfigService ssoConfigService,
     IGetOrganizationApiKeyCommand getOrganizationApiKeyCommand,
     IRotateOrganizationApiKeyCommand rotateOrganizationApiKeyCommand,
     IOrganizationApiKeyRepository organizationApiKeyRepository,
     GlobalSettings globalSettings)
 {
     _organizationRepository     = organizationRepository;
     _organizationUserRepository = organizationUserRepository;
     _policyRepository           = policyRepository;
     _organizationService        = organizationService;
     _userService                     = userService;
     _paymentService                  = paymentService;
     _currentContext                  = currentContext;
     _ssoConfigRepository             = ssoConfigRepository;
     _ssoConfigService                = ssoConfigService;
     _getOrganizationApiKeyCommand    = getOrganizationApiKeyCommand;
     _rotateOrganizationApiKeyCommand = rotateOrganizationApiKeyCommand;
     _organizationApiKeyRepository    = organizationApiKeyRepository;
     _globalSettings                  = globalSettings;
 }
Exemple #2
0
 public AccountController(
     IAuthenticationSchemeProvider schemeProvider,
     IClientStore clientStore,
     IIdentityServerInteractionService interaction,
     ILogger <AccountController> logger,
     IOrganizationRepository organizationRepository,
     IOrganizationUserRepository organizationUserRepository,
     ISsoConfigRepository ssoConfigRepository,
     ISsoUserRepository ssoUserRepository,
     IUserRepository userRepository,
     IPolicyRepository policyRepository,
     IUserService userService,
     II18nService i18nService,
     UserManager <User> userManager)
 {
     _schemeProvider             = schemeProvider;
     _clientStore                = clientStore;
     _interaction                = interaction;
     _logger                     = logger;
     _organizationRepository     = organizationRepository;
     _organizationUserRepository = organizationUserRepository;
     _userRepository             = userRepository;
     _ssoConfigRepository        = ssoConfigRepository;
     _ssoUserRepository          = ssoUserRepository;
     _policyRepository           = policyRepository;
     _userService                = userService;
     _i18nService                = i18nService;
     _userManager                = userManager;
 }
 public CustomTokenRequestValidator(
     UserManager <User> userManager,
     IDeviceRepository deviceRepository,
     IDeviceService deviceService,
     IUserService userService,
     IEventService eventService,
     IOrganizationDuoWebTokenProvider organizationDuoWebTokenProvider,
     IOrganizationRepository organizationRepository,
     IOrganizationUserRepository organizationUserRepository,
     IApplicationCacheService applicationCacheService,
     IMailService mailService,
     ILogger <ResourceOwnerPasswordValidator> logger,
     ICurrentContext currentContext,
     GlobalSettings globalSettings,
     IPolicyRepository policyRepository,
     ISsoConfigRepository ssoConfigRepository,
     IUserRepository userRepository,
     ICaptchaValidationService captchaValidationService)
     : base(userManager, deviceRepository, deviceService, userService, eventService,
            organizationDuoWebTokenProvider, organizationRepository, organizationUserRepository,
            applicationCacheService, mailService, logger, currentContext, globalSettings, policyRepository,
            userRepository, captchaValidationService)
 {
     _userManager            = userManager;
     _ssoConfigRepository    = ssoConfigRepository;
     _organizationRepository = organizationRepository;
 }
Exemple #4
0
 public SsoController(
     ISsoConfigRepository ssoConfigRepository,
     EnterprisePortalCurrentContext enterprisePortalCurrentContext,
     II18nService i18nService,
     GlobalSettings globalSettings)
 {
     _ssoConfigRepository            = ssoConfigRepository;
     _enterprisePortalCurrentContext = enterprisePortalCurrentContext;
     _i18nService    = i18nService;
     _globalSettings = globalSettings;
 }
Exemple #5
0
 public AccountController(
     IIdentityServerInteractionService interaction,
     IUserRepository userRepository,
     ISsoConfigRepository ssoConfigRepository,
     IClientStore clientStore,
     ILogger <AccountController> logger)
 {
     _interaction         = interaction;
     _userRepository      = userRepository;
     _ssoConfigRepository = ssoConfigRepository;
     _clientStore         = clientStore;
     _logger = logger;
 }
Exemple #6
0
 public SsoController(
     IIdentityServerInteractionService interaction,
     ILogger <SsoController> logger,
     ISsoConfigRepository ssoConfigRepository,
     IUserRepository userRepository,
     IHttpClientFactory clientFactory)
 {
     _interaction         = interaction;
     _logger              = logger;
     _ssoConfigRepository = ssoConfigRepository;
     _userRepository      = userRepository;
     _clientFactory       = clientFactory;
 }
Exemple #7
0
 public SsoConfigService(
     ISsoConfigRepository ssoConfigRepository,
     IPolicyRepository policyRepository,
     IOrganizationRepository organizationRepository,
     IOrganizationUserRepository organizationUserRepository,
     IEventService eventService)
 {
     _ssoConfigRepository        = ssoConfigRepository;
     _policyRepository           = policyRepository;
     _organizationRepository     = organizationRepository;
     _organizationUserRepository = organizationUserRepository;
     _eventService = eventService;
 }
Exemple #8
0
 public PolicyService(
     IEventService eventService,
     IOrganizationRepository organizationRepository,
     IOrganizationUserRepository organizationUserRepository,
     IPolicyRepository policyRepository,
     ISsoConfigRepository ssoConfigRepository,
     IMailService mailService)
 {
     _eventService               = eventService;
     _organizationRepository     = organizationRepository;
     _organizationUserRepository = organizationUserRepository;
     _policyRepository           = policyRepository;
     _ssoConfigRepository        = ssoConfigRepository;
     _mailService = mailService;
 }
Exemple #9
0
 public AccountController(
     IClientStore clientStore,
     IIdentityServerInteractionService interaction,
     ILogger <AccountController> logger,
     ISsoConfigRepository ssoConfigRepository,
     IUserRepository userRepository,
     IOrganizationRepository organizationRepository,
     IHttpClientFactory clientFactory)
 {
     _clientStore            = clientStore;
     _interaction            = interaction;
     _logger                 = logger;
     _ssoConfigRepository    = ssoConfigRepository;
     _userRepository         = userRepository;
     _organizationRepository = organizationRepository;
     _clientFactory          = clientFactory;
 }
        public OrganizationsControllerTests()
        {
            _currentContext             = Substitute.For <ICurrentContext>();
            _globalSettings             = Substitute.For <GlobalSettings>();
            _organizationRepository     = Substitute.For <IOrganizationRepository>();
            _organizationService        = Substitute.For <IOrganizationService>();
            _organizationUserRepository = Substitute.For <IOrganizationUserRepository>();
            _paymentService             = Substitute.For <IPaymentService>();
            _policyRepository           = Substitute.For <IPolicyRepository>();
            _ssoConfigRepository        = Substitute.For <ISsoConfigRepository>();
            _ssoConfigService           = Substitute.For <ISsoConfigService>();
            _userService = Substitute.For <IUserService>();

            _sut = new OrganizationsController(_organizationRepository, _organizationUserRepository,
                                               _policyRepository, _organizationService, _userService, _paymentService, _currentContext,
                                               _ssoConfigRepository, _ssoConfigService, _globalSettings);
        }
Exemple #11
0
        public DynamicAuthenticationSchemeProvider(
            IOptions <AuthenticationOptions> options,
            IPostConfigureOptions <OpenIdConnectOptions> oidcPostConfigureOptions,
            IOptionsMonitorCache <OpenIdConnectOptions> oidcOptionsMonitorCache,
            IPostConfigureOptions <Saml2Options> saml2PostConfigureOptions,
            IOptionsMonitorCache <Saml2Options> saml2OptionsMonitorCache,
            ISsoConfigRepository ssoConfigRepository,
            ILogger <DynamicAuthenticationSchemeProvider> logger,
            GlobalSettings globalSettings,
            SamlEnvironment samlEnvironment,
            IHttpContextAccessor httpContextAccessor)
            : base(options)
        {
            _oidcPostConfigureOptions        = oidcPostConfigureOptions;
            _extendedOidcOptionsMonitorCache = oidcOptionsMonitorCache as
                                               IExtendedOptionsMonitorCache <OpenIdConnectOptions>;
            if (_extendedOidcOptionsMonitorCache == null)
            {
                throw new ArgumentNullException("_extendedOidcOptionsMonitorCache could not be resolved.");
            }

            _saml2PostConfigureOptions        = saml2PostConfigureOptions;
            _extendedSaml2OptionsMonitorCache = saml2OptionsMonitorCache as
                                                IExtendedOptionsMonitorCache <Saml2Options>;
            if (_extendedSaml2OptionsMonitorCache == null)
            {
                throw new ArgumentNullException("_extendedSaml2OptionsMonitorCache could not be resolved.");
            }

            _ssoConfigRepository = ssoConfigRepository;
            _logger               = logger;
            _globalSettings       = globalSettings;
            _schemeCacheLifetime  = TimeSpan.FromSeconds(_globalSettings.Sso?.CacheLifetimeInSeconds ?? 30);
            _samlEnvironment      = samlEnvironment;
            _cachedSchemes        = new Dictionary <string, DynamicAuthenticationScheme>();
            _cachedHandlerSchemes = new Dictionary <string, DynamicAuthenticationScheme>();
            _semaphore            = new SemaphoreSlim(1);
            _httpContextAccessor  = httpContextAccessor ?? throw new ArgumentNullException(nameof(httpContextAccessor));
        }
Exemple #12
0
 public OrganizationsController(
     IOrganizationRepository organizationRepository,
     IOrganizationUserRepository organizationUserRepository,
     IPolicyRepository policyRepository,
     IOrganizationService organizationService,
     IUserService userService,
     IPaymentService paymentService,
     ICurrentContext currentContext,
     ISsoConfigRepository ssoConfigRepository,
     ISsoConfigService ssoConfigService,
     GlobalSettings globalSettings)
 {
     _organizationRepository     = organizationRepository;
     _organizationUserRepository = organizationUserRepository;
     _policyRepository           = policyRepository;
     _organizationService        = organizationService;
     _userService         = userService;
     _paymentService      = paymentService;
     _currentContext      = currentContext;
     _ssoConfigRepository = ssoConfigRepository;
     _ssoConfigService    = ssoConfigService;
     _globalSettings      = globalSettings;
 }
Exemple #13
0
 public AccountController(
     IAuthenticationSchemeProvider schemeProvider,
     IClientStore clientStore,
     IIdentityServerInteractionService interaction,
     ILogger <AccountController> logger,
     IOrganizationRepository organizationRepository,
     IOrganizationUserRepository organizationUserRepository,
     IOrganizationService organizationService,
     ISsoConfigRepository ssoConfigRepository,
     ISsoUserRepository ssoUserRepository,
     IUserRepository userRepository,
     IPolicyRepository policyRepository,
     IUserService userService,
     II18nService i18nService,
     UserManager <User> userManager,
     IGlobalSettings globalSettings,
     Core.Services.IEventService eventService,
     IDataProtectorTokenFactory <SsoTokenable> dataProtector)
 {
     _schemeProvider             = schemeProvider;
     _clientStore                = clientStore;
     _interaction                = interaction;
     _logger                     = logger;
     _organizationRepository     = organizationRepository;
     _organizationUserRepository = organizationUserRepository;
     _organizationService        = organizationService;
     _userRepository             = userRepository;
     _ssoConfigRepository        = ssoConfigRepository;
     _ssoUserRepository          = ssoUserRepository;
     _policyRepository           = policyRepository;
     _userService                = userService;
     _i18nService                = i18nService;
     _userManager                = userManager;
     _eventService               = eventService;
     _globalSettings             = globalSettings;
     _dataProtector              = dataProtector;
 }
Exemple #14
0
 public SsoConfigService(
     ISsoConfigRepository ssoConfigRepository)
 {
     _ssoConfigRepository = ssoConfigRepository;
 }