Example #1
0
 public AuthenticationController(IAuthenticationRepository repository, IConfiguration config, IMapper mapper, Seed seed)
 {
     this.mapper = mapper;
     this.seed   = seed;
     _config     = config;
     _repository = repository;
 }
 public PlayListController()
 {
     _repo = PlayListRepositoryLocator.Get();
     //_repoList = ListsRepositoryLocator.Get();
     //_repoArchive = CardsArchiveRepositoryLocator.Get();
     _repoUser = AuthenticationMemoryLocator.Get();
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SessionsService" /> class.
 /// </summary>
 /// <param name="sessionManager">The session manager.</param>
 /// <param name="userManager">The user manager.</param>
 /// <param name="authContext">The authentication context.</param>
 /// <param name="authRepo">The authentication repo.</param>
 public SessionsService(ISessionManager sessionManager, IUserManager userManager, IAuthorizationContext authContext, IAuthenticationRepository authRepo)
 {
     _sessionManager = sessionManager;
     _userManager    = userManager;
     _authContext    = authContext;
     _authRepo       = authRepo;
 }
		public Wayf(IPortalApplication portalApplication, IAuthenticationRepository authenticationRepository,
		            IWayfFilter wayfFilter, IAuthenticationModule authenticationModule) : base(portalApplication)
		{
			_wayfFilter = wayfFilter;
			AuthenticationRepository = authenticationRepository;
			AuthenticationModule = authenticationModule;
		}
Example #5
0
 public DeviceAccessEntryPoint(IUserManager userManager, IAuthenticationRepository authRepo, IDeviceManager deviceManager, ISessionManager sessionManager)
 {
     _userManager    = userManager;
     _authRepo       = authRepo;
     _deviceManager  = deviceManager;
     _sessionManager = sessionManager;
 }
		public EmailPassword(IPortalApplication portalApplication, IAuthenticationRepository authenticationRepository,
		                     PasswordSettings settings, IAuthenticationModule authenticationModule) : base(portalApplication)
		{
			AuthenticationRepository = authenticationRepository;
			Settings = settings;
			AuthenticationModule = authenticationModule;
		}
 public AuthenticationController(IAuthenticationRepository repository, IConfiguration config,
                                 IMapper mapper)
 {
     _config         = config;
     _authRepository = repository;
     _mapper         = mapper;
 }
Example #8
0
 public SignupToServeProcessor(IServeService serveService, IConfigurationWrapper configurationWrapper, IAuthenticationRepository authenticationService)
     : base(authenticationService, configurationWrapper)
 {
     this._serveService          = serveService;
     this._configurationWrapper  = configurationWrapper;
     this._authenticationService = authenticationService;
 }
Example #9
0
 public HomeController()
 {
     _repo = PlayListRepositoryLocator.Get();
     // iv - 2012.11.14
     _repoAuthentication = AuthenticationMemoryLocator.Get();
     /*_repoAuthentication.Add(new User { Nickname = "Administrator", Nome = "Administrator", Password = "******", Email = "*****@*****.**", role = Role.Administrator });*/
 }
 public AuthenticationService(IAuthenticationRepository authenticationRepository, IUserClaimRepository userClaimRepository,
                              IUserLoginRepository userLoginRepository, IUserTokenRepository userTokenRepository)
 {
     _userTokenRepository      = userTokenRepository;
     _userLoginRepository      = userLoginRepository;
     _authenticationRepository = authenticationRepository;
     _userClaimRepository      = userClaimRepository;
 }
Example #11
0
 public IAuthenticationRepository GetAuthenticationRepository()
 {
     if (authenticationRepository == null)
     {
         authenticationRepository = new AuthenticationRepository(context);
     }
     return(authenticationRepository);
 }
Example #12
0
 public AuthenticationController(IAuthenticationService authenticationService, IAuthenticationRepository authenticationRepository, IMapper mapper,
                                 IOptions <AppSettings> appSettings)
 {
     _authenticationService    = authenticationService;
     _authenticationRepository = authenticationRepository;
     _mapper      = mapper;
     _appSettings = appSettings.Value;
 }
Example #13
0
 public LoginService(IAuthenticationRepository authenticationService, IConfigurationWrapper configurationWrapper, IContactRepository contactService, IEmailCommunication emailCommunication, IUserRepository userService)
 {
     _configurationWrapper  = configurationWrapper;
     _contactService        = contactService;
     _emailCommunication    = emailCommunication;
     _userService           = userService;
     _authenticationService = authenticationService;
 }
Example #14
0
 public UnitOfWork(IAuthenticationRepository authenticationRepository,
                   IJournalRepository journalRepository,
                   AuthenticationContext context)
 {
     AuthenticationRepository = authenticationRepository ?? throw new ArgumentNullException($"No instance of {nameof(IAuthenticationRepository)} provided.");
     JournalRepository        = journalRepository ?? throw new ArgumentNullException($"No instance of {nameof(IJournalRepository)} provided.");
     _context = context ?? throw new ArgumentNullException($"No instance of {nameof(AuthenticationContext)} provided.");
 }
Example #15
0
 public UserRepository(IAuthenticationRepository authenticationService, IConfigurationWrapper configurationWrapper,
                       IMinistryPlatformService ministryPlatformService, IMinistryPlatformRestRepository ministryPlatformRest) : base(authenticationService, configurationWrapper)
 {
     _ministryPlatformService  = ministryPlatformService;
     _ministryPlatformRest     = ministryPlatformRest;
     _usersApiLookupPageViewId = _configurationWrapper.GetConfigIntValue("UsersApiLookupPageView");
     _usersPageId = _configurationWrapper.GetConfigIntValue("Users");
 }
Example #16
0
        public AuthenticationService(
            AppSetting appSetting,
            IAuthenticationRepository authenticationRepository)
        {
            this._appSetting = appSetting;

            this._authenticationRepository = authenticationRepository;
        }
 public InvitationRepository(IMinistryPlatformService ministryPlatformService,
                             IConfigurationWrapper configurationWrapper,
                             IAuthenticationRepository authenticationService)
     : base(authenticationService, configurationWrapper)
 {
     _ministryPlatformService = ministryPlatformService;
     _invitationPageId        = _configurationWrapper.GetConfigIntValue("InvitationPageID");
 }
Example #18
0
 public AuthenticationService(IAuthenticationRepository authenticationRepository,
                              SigningConfigurations signingConfigurations,
                              TokenConfigurations tokenConfigurations)
 {
     _authenticationRepository = authenticationRepository;
     _signingConfigurations    = signingConfigurations;
     _tokenConfigurations      = tokenConfigurations;
 }
Example #19
0
 public IdentityAppService(IAuthenticationRepository authRepository, ITokenRepository tokenRepository,
                           ClaimBaseRepository claimBaseRepository, ITokenService tokenService)
 {
     _authRepository      = authRepository;
     _tokenRepository     = tokenRepository;
     _claimBaseRepository = claimBaseRepository;
     _tokenService        = tokenService;
 }
Example #20
0
        public void Init()
        {
            _loginUser = new AuthenticationUser
            {
                Id        = 1,
                Login     = Login,
                UserSalt  = UserSalt,
                Password  = HashedPassword,
                IsEnabled = true
            };

            _sqlUserRepositoryMock = new Mock <IUserRepository>();
            _sqlUserRepositoryMock
            .Setup(m => m.GetUserByLoginAsync(Login))
            .ReturnsAsync(_loginUser);
            _sqlUserRepositoryMock
            .Setup(m => m.ValidateUserPasswordForHistoryAsync(It.IsAny <int>(), It.Is <string>(p => p != NewPreviouslyUsedPassword)))
            .ReturnsAsync(true);
            _sqlUserRepositoryMock
            .Setup(m => m.ValidateUserPasswordForHistoryAsync(It.IsAny <int>(), It.Is <string>(p => p == NewPreviouslyUsedPassword)))
            .ReturnsAsync(false);

            _instanceSettings = new InstanceSettings
            {
                MaximumInvalidLogonAttempts = 5
            };

            _sqlSettingsRepositoryMock = new Mock <ISqlSettingsRepository>();
            _sqlSettingsRepositoryMock
            .Setup(m => m.GetInstanceSettingsAsync())
            .ReturnsAsync(_instanceSettings);

            _ldapRepositoryMock = new Mock <ILdapRepository>();
            _samlRepositoryMock = new Mock <ISamlRepository>();
            _logRepositoryMock  = new Mock <IServiceLogRepository>();

            _applicationSettings = new ApplicationSetting[]
            {
                new ApplicationSetting
                {
                    Key   = PasswordChangeCooldownInHoursKey,
                    Value = DefaultPasswordChangeCooldownInHours
                }
            };

            _applicationSettingsRepositoryMock = new Mock <IApplicationSettingsRepository>();
            _applicationSettingsRepositoryMock
            .Setup(m => m.GetSettingsAsync(false))
            .Returns(() => Task.Run(() => _applicationSettings));

            _authenticationRepository = new AuthenticationRepository(_sqlUserRepositoryMock.Object,
                                                                     _sqlSettingsRepositoryMock.Object,
                                                                     _ldapRepositoryMock.Object,
                                                                     _samlRepositoryMock.Object,
                                                                     _logRepositoryMock.Object,
                                                                     _applicationSettingsRepositoryMock.Object);
        }
Example #21
0
 public void TestInitialize()
 {
     authenticationRepo   = new DataAccessLayer.UserAuthenticationRepository.UserAuthenticationRepository(true);
     codeAnalysisGater    = new CodeGater(true);
     userCodeAnalysisRepo = new DataAccessLayer.UserCodeAnalysisRepository.UserCodeAnalysisRepository(true);
     authenticationRepo.SignUp("Admin", "pass");
     userCodeAnalysisRepo.Add("Admin", "path", "master", Tools.PVS, 20, -1);
     userCodeAnalysisRepo.Add("Admin", "path", "master", Tools.PVS, 10, -1);
 }
Example #22
0
 public ObjectAttributeRepository(IAuthenticationRepository authenticationService,
                                  IConfigurationWrapper configurationWrapper,
                                  IMinistryPlatformService ministryPlatformService,
                                  IMinistryPlatformRestRepository ministryPlatformRest)
     : base(authenticationService, configurationWrapper)
 {
     _ministryPlatformService = ministryPlatformService;
     _ministryPlatformRest    = ministryPlatformRest;
 }
 public AdminController(
     IAuthenticationRepository authRepo,
     IAdminRepository adminRepo,
     IOptionsMonitor <GlobalOptions> options)
 {
     _options   = options;
     _authRepo  = authRepo;
     _adminRepo = adminRepo;
 }
Example #24
0
        public ResponseRepository(IAuthenticationRepository authenticationService, IConfigurationWrapper configurationWrapper, IMinistryPlatformService ministryPlatformService)
            : base(authenticationService, configurationWrapper)
        {
            _authenticationService   = authenticationService;
            _configurationWrapper    = configurationWrapper;
            _ministryPlatformService = ministryPlatformService;

            _signupToServeRemindersId = _configurationWrapper.GetConfigIntValue("SignupToServeReminders");
        }
        public FacebookAuthController()
        {
            FbConfigHelper = new FbConfigHelper();

            var fac = new Factory();

            FbUrlHelper = fac.GetFbUrlHelper(FbConfigHelper);
            AuthenticationRepository = fac.GetAuthenticationRepository(FbConfigHelper);
        }
Example #26
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ApiKeyController"/> class.
 /// </summary>
 /// <param name="sessionManager">Instance of <see cref="ISessionManager"/> interface.</param>
 /// <param name="appHost">Instance of <see cref="IServerApplicationHost"/> interface.</param>
 /// <param name="authRepo">Instance of <see cref="IAuthenticationRepository"/> interface.</param>
 public ApiKeyController(
     ISessionManager sessionManager,
     IServerApplicationHost appHost,
     IAuthenticationRepository authRepo)
 {
     _sessionManager = sessionManager;
     _appHost        = appHost;
     _authRepo       = authRepo;
 }
Example #27
0
 public RoomRepository(IMinistryPlatformService ministryPlatformService,
                       IMinistryPlatformRestRepository ministryPlatformRestRepository,
                       IAuthenticationRepository authenticationService,
                       IConfigurationWrapper configuration)
     : base(authenticationService, configuration)
 {
     _ministryPlatformService        = ministryPlatformService;
     _ministryPlatformRestRepository = ministryPlatformRestRepository;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DevicesController"/> class.
 /// </summary>
 /// <param name="deviceManager">Instance of <see cref="IDeviceManager"/> interface.</param>
 /// <param name="authenticationRepository">Instance of <see cref="IAuthenticationRepository"/> interface.</param>
 /// <param name="sessionManager">Instance of <see cref="ISessionManager"/> interface.</param>
 public DevicesController(
     IDeviceManager deviceManager,
     IAuthenticationRepository authenticationRepository,
     ISessionManager sessionManager)
 {
     _deviceManager            = deviceManager;
     _authenticationRepository = authenticationRepository;
     _sessionManager           = sessionManager;
 }
 public TaskRepository(IAuthenticationRepository authenticationService, IConfigurationWrapper configurationWrapper,
                       IMinistryPlatformService ministryPlatformService, IMinistryPlatformRestRepository ministryPlatformRestRepository) :
     base(authenticationService, configurationWrapper)
 {
     _ministryPlatformService        = ministryPlatformService;
     _ministryPlatformRestRepository = ministryPlatformRestRepository;
     _autoStartedTaskPageViewId      = _configurationWrapper.GetConfigIntValue("TasksNeedingAutoStarted");
     _roomReservationPageID          = _configurationWrapper.GetConfigIntValue("RoomReservationPageId");
 }
 public AuthenticationsController(
     IMapper mapper,
     IAuthenticationRepository authenticationRepository)
 {
     this.Mapper = mapper ??
                   throw new ArgumentNullException(nameof(mapper));
     this.AuthenticationRepository = authenticationRepository ??
                                     throw new ArgumentNullException(nameof(authenticationRepository));
 }
Example #31
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SessionCleanerTask"/> class.
 /// </summary>
 /// <param name="authenticationRepository">Instance of the <see cref="IAuthenticationRepository"/> interface.</param>
 /// <param name="sessionManager">Instance of the <see cref="ISessionManager"/> interface.</param>
 /// <param name="localizationManager">Instance of the <see cref="ILocalizationManager"/> interface.</param>
 public SessionCleanerTask(
     IAuthenticationRepository authenticationRepository,
     ISessionManager sessionManager,
     ILocalizationManager localizationManager)
 {
     _authenticationRepository = authenticationRepository;
     _sessionManager           = sessionManager;
     _localizationManager      = localizationManager;
 }
Example #32
0
 public UserService(IUserManager userManager, ISessionManager sessionMananger, IAuthenticationRepository authRepo, IServerConfigurationManager config, INetworkManager networkManager, IDeviceManager deviceManager, IAuthorizationContext authContext)
 {
     _userManager     = userManager;
     _sessionMananger = sessionMananger;
     _authRepo        = authRepo;
     _config          = config;
     _networkManager  = networkManager;
     _deviceManager   = deviceManager;
     _authContext     = authContext;
 }
Example #33
0
 public SessionsService(ISessionManager sessionManager, IServerApplicationHost appHost, IUserManager userManager, IAuthorizationContext authContext, IAuthenticationRepository authRepo, IDeviceManager deviceManager, ISessionContext sessionContext)
 {
     _sessionManager = sessionManager;
     _userManager    = userManager;
     _authContext    = authContext;
     _authRepo       = authRepo;
     _deviceManager  = deviceManager;
     _sessionContext = sessionContext;
     _appHost        = appHost;
 }
Example #34
0
 public UserDirectoryProvider(
     IConfigurationManager configurationManager,
     IAuthenticationRepository authenticationRepository,
     IPasswordHash passwordHash, ILogService logger)
 {
     _configurationManager     = configurationManager;
     _authenticationRepository = authenticationRepository;
     _passwordHash             = passwordHash;
     _logger = logger;
 }
 public AuthenticationCheck(OwinMiddleware next)
     : base(next)
 {
     _repo = new OGVAuthenticationRepository();
 }
Example #36
0
 public SimpleLogger(OwinMiddleware next)
     : base(next)
 {
     _repo = new OGVAuthenticationRepository();
 }
Example #37
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SessionManager" /> class.
 /// </summary>
 /// <param name="userDataRepository">The user data repository.</param>
 /// <param name="configurationManager">The configuration manager.</param>
 /// <param name="logger">The logger.</param>
 /// <param name="userRepository">The user repository.</param>
 /// <param name="libraryManager">The library manager.</param>
 public SessionManager(IUserDataManager userDataRepository, IServerConfigurationManager configurationManager, ILogger logger, IUserRepository userRepository, ILibraryManager libraryManager, IUserManager userManager, IMusicManager musicManager, IDtoService dtoService, IImageProcessor imageProcessor, IItemRepository itemRepo, IJsonSerializer jsonSerializer, IServerApplicationHost appHost, IHttpClient httpClient, IAuthenticationRepository authRepo)
 {
     _userDataRepository = userDataRepository;
     _configurationManager = configurationManager;
     _logger = logger;
     _userRepository = userRepository;
     _libraryManager = libraryManager;
     _userManager = userManager;
     _musicManager = musicManager;
     _dtoService = dtoService;
     _imageProcessor = imageProcessor;
     _itemRepo = itemRepo;
     _jsonSerializer = jsonSerializer;
     _appHost = appHost;
     _httpClient = httpClient;
     _authRepo = authRepo;
 }
		public SecureCookie(IPortalApplication portalApplication, IAuthenticationRepository repository,
		                    IAuthenticationModule authenticationModule) : base(portalApplication)
		{
			AuthenticationRepository = repository;
			AuthenticationModule = authenticationModule;
		}
 public AuthenticationController()
 {
     repo = new OGVAuthenticationRepository();
 }
Example #40
0
 public ProfileController()
 {
     _repo = AuthenticationMemoryLocator.Get();
 }
 public AuthKey(IPortalApplication portalApplication, IAuthenticationRepository authenticationRepository): base(portalApplication)
 {
     AuthenticationRepository = authenticationRepository;
 }
Example #42
0
 public AuthorizationContext(IAuthenticationRepository authRepo, IConnectManager connectManager)
 {
     _authRepo = authRepo;
     _connectManager = connectManager;
 }
 public AuthenticationService(IAuthenticationRepository authenticationRepository)
 {
     _authenticationRepository = authenticationRepository;
 }
Example #44
0
 public AccountController()
 {
     _repoAuthentication = AuthenticationMemoryLocator.Get();
 }
 public AuthenticationService(IAuthenticationRepository _authRepository)
 {
     AuthenticationRepository = _authRepository;
 }
 public AuthorizationContext(IAuthenticationRepository authRepo)
 {
     _authRepo = authRepo;
 }
 static AccountProfileProvider()
 {
     c_repository = new AuthenticationRepository();
 }