/// <summary> /// Creates a new instance. This class is also used to shareable a context across all instance that are created below one Cluster instance. /// One configuration instance per Cluster instance. /// </summary> internal Configuration(Policies policies, ProtocolOptions protocolOptions, PoolingOptions poolingOptions, SocketOptions socketOptions, ClientOptions clientOptions, IAuthProvider authProvider, IAuthInfoProvider authInfoProvider, QueryOptions queryOptions, IAddressTranslator addressTranslator) { if (addressTranslator == null) { throw new ArgumentNullException("addressTranslator"); } if (queryOptions == null) { throw new ArgumentNullException("queryOptions"); } _policies = policies; _protocolOptions = protocolOptions; _poolingOptions = poolingOptions; _socketOptions = socketOptions; _clientOptions = clientOptions; _authProvider = authProvider; _authInfoProvider = authInfoProvider; _queryOptions = queryOptions; _addressTranslator = addressTranslator; }
internal ControlConnection(Cluster cluster, IEnumerable<IPAddress> clusterEndpoints, Policies policies, ProtocolOptions protocolOptions, PoolingOptions poolingOptions, SocketOptions socketOptions, ClientOptions clientOptions, IAuthProvider authProvider, IAuthInfoProvider authInfoProvider) { _cluster = cluster; _reconnectionSchedule = _reconnectionPolicy.NewSchedule(); _reconnectionTimer = new Timer(ReconnectionClb, null, Timeout.Infinite, Timeout.Infinite); var config = new Configuration ( policies, protocolOptions, poolingOptions, socketOptions, clientOptions, authProvider, authInfoProvider, new QueryOptions() ); _session = new Session(cluster, config, "", ControlConnectionProtocolVersion); }
public StartupParams(IAuthProvider provider, IPathManager pathManager, ICustomNodeManager customNodeManager) { this.authProvider = provider; this.pathManager = pathManager; this.customNodeManager = customNodeManager; }
public VerifyUserAccountController(IUserRepo urep, IAuthProvider auth, IAccountRepo account, ICCFolderRepo folderRep) { userRepository = urep; authProvider = auth; accRepository = account; CCFolderRepository = folderRep; }
public AuthFeature(Func<IAuthSession> sessionFactory, IAuthProvider[] authProviders, string htmlRedirect = null) { this.sessionFactory = sessionFactory; this.authProviders = authProviders; Func<string,string> localize = HostContext.ResolveLocalizedString; ServiceRoutes = new Dictionary<Type, string[]> { { typeof(AuthenticateService), new[] { "/" + localize(LocalizedStrings.Auth), "/" + localize(LocalizedStrings.Auth) + "/{provider}", "/" + localize(LocalizedStrings.Authenticate), "/" + localize(LocalizedStrings.Authenticate) + "/{provider}", } }, { typeof(AssignRolesService), new[]{ "/" + localize(LocalizedStrings.AssignRoles) } }, { typeof(UnAssignRolesService), new[]{ "/" + localize(LocalizedStrings.UnassignRoles) } }, }; RegisterPlugins = new List<IPlugin> { new SessionFeature() }; this.HtmlRedirect = htmlRedirect ?? "~/" + localize(LocalizedStrings.Login); }
public AuthFeature(Func<IAuthSession> sessionFactory, IAuthProvider[] authProviders, string htmlRedirect = null) { this.sessionFactory = sessionFactory; this.authProviders = authProviders; Func<string,string> localize = s => HostContext.AppHost.ResolveLocalizedString(s, null); ServiceRoutes = new Dictionary<Type, string[]> { { typeof(AuthenticateService), new[] { "/" + localize(LocalizedStrings.Auth), "/" + localize(LocalizedStrings.Auth) + "/{provider}", "/" + localize(LocalizedStrings.Authenticate), "/" + localize(LocalizedStrings.Authenticate) + "/{provider}", } }, { typeof(AssignRolesService), new[]{ "/" + localize(LocalizedStrings.AssignRoles) } }, { typeof(UnAssignRolesService), new[]{ "/" + localize(LocalizedStrings.UnassignRoles) } }, }; RegisterPlugins = new List<IPlugin> { new SessionFeature() }; AuthEvents = new List<IAuthEvents>(); this.HtmlRedirect = htmlRedirect ?? "~/" + localize(LocalizedStrings.Login); this.IncludeAuthMetadataProvider = true; this.ValidateUniqueEmails = true; this.DeleteSessionCookiesOnLogout = true; }
public void SetUp() { AppraiserSignUpService = Substitute.For<IAppraiserSignUpService>(); AuthProvider = Substitute.For<IAuthProvider>(); Target = new AppraiserSignUpController(AppraiserSignUpService, AuthProvider); Target.CommitProviderInstance = Substitute.For<ICommitProvider>(); }
/// <summary> /// Disposes of the resources (other than memory) used by the module that implements <see cref="T:System.Web.IHttpModule"/>. /// </summary> public void Dispose() { if( _aP != null ) { _aP.Dispose(); _aP = null; } }
public TpAuthenticationManager() { _authProvider = this; _password = SettingsManager.UserPassword; _userName = SettingsManager.UserName; _isIntegrated = SettingsManager.UseIntegratedAuth; }
public Gist( ILogProvider logProvider, ICacheProvider cacheProvider, IAuthProvider authProvider) : base( logProvider, cacheProvider, authProvider) { }
public SettingsController(IUserService userService, IAuthProvider authProvider, ILocationService locationService, IHash hash) { _userService = new UserServiceClient(); _authProvider = authProvider; _locationService = new LocationServiceClient(); _hash = hash; }
public UserController(IAuthProvider authProvider) { _postService = new PostServiceClient(); _friendService = new FriendServiceClient(); _userService = new UserServiceClient(); _authProvider = authProvider; _commentService = new CommentServiceClient(); }
public override void Configure(Container container) { var authProviders = new IAuthProvider[] { new AadAuthProvider(AppSettings) }; Plugins.Add(new AuthFeature( () => new AuthUserSession(), authProviders, htmlRedirect: "/auth/aad")); }
public void SetUp() { _authProvider = MockRepository.GenerateMock<IAuthProvider>(); _adminController = new AdminController(_authProvider); var httpContextMock = MockRepository.GenerateMock<HttpContextBase>(); _adminController.Url = new UrlHelper(new RequestContext(httpContextMock, new RouteData())); }
protected AbstractMasterDetailPage (IAuthProvider ap) : base() { Icon = GetIcon(); this.ap = ap; ShowPersonalPages (ap.AuthState.IsAuthorised); ap.AuthState.OnAuthChange += OnAuthChange; }
private async Task InstallNew(GroupContent mod, IAuthProvider provider, Action<SyncOptions> config, IAbsoluteDirectoryPath folder) { SetupHosts(mod, provider); var opts = new SyncOptions(); config(opts); await Repository.Factory.Clone(opts.Hosts, folder.ToString(), config) .ConfigureAwait(false); }
public HomeController(IUsersManagement userManagement, IAuthProvider authenticationProvider, IUserAccessHelper userAccessHelper, IAppraiserManagement appraiserManagement, ITaskManager taskManager) { _userManagement = userManagement; _authenticationProvider = authenticationProvider; _userAccessHelper = userAccessHelper; _appraiserManagement = appraiserManagement; _taskManager = taskManager; }
public AccountController(IAuthProvider authProvider, IAccountRepository accountRepository) { Guard.ArgNotNull(authProvider, "authProvider"); Guard.ArgNotNull(accountRepository, "accountRepository"); _authProvider = authProvider; _accountRepository = accountRepository; if (_managerService == null) _managerService = new SnippetCacheManagerServiceClient(); }
public StartupParams(IAuthProvider provider, IPathManager pathManager, ILibraryLoader libraryLoader, ICustomNodeManager customNodeManager, Version dynamoVersion) { this.authProvider = provider; this.pathManager = pathManager; this.libraryLoader = libraryLoader; this.customNodeManager = customNodeManager; this.dynamoVersion = dynamoVersion; }
public BasicAuthenticationModule() { var provider = ConfigReader.GetConfigValue("ODataTFS.AuthProvider"); var tfsServer = ConfigReader.GetConfigValue("ODataTFS.TfsServer"); var providerType = Type.GetType(provider, true); var tfsServerUri = new Uri(tfsServer, UriKind.Absolute); this.authProvider = Activator.CreateInstance(providerType, new[] { tfsServerUri }) as IAuthProvider; }
public AccountController(IAuthProvider authProvider, IAccountRepository accountRepository, ISnippetCacheManagerService managerService) { Guard.ArgNotNull(authProvider, "authProvider"); Guard.ArgNotNull(accountRepository, "accountRepository"); Guard.ArgNotNull(managerService, "managerService"); _authProvider = authProvider; _accountRepository = accountRepository; _managerService = managerService; }
public LoginController(IAuthProvider auth, IUserRepo userRepo, ICCFolderRepo folder, IAccountRepo account, ICCTokenRepo token, INotificationManager notifMgr, ICCItemRepo item, ICCErrorLogRepo errorlogs) { authProvider = auth; userRepository = userRepo; CCFolderRepository = folder; accRepository = account; CCTokenRepository = token; notifManager = notifMgr; items = item; CCErrorLogRepository = errorlogs; }
public AuthenticationManager(IAuthProvider authProvider) { this.authProvider = authProvider; // The lack of AuthProvider indicates that the user cannot login for this // session. Hence, we do not subscribe to this event. if (this.authProvider != null) { this.authProvider.LoginStateChanged += OnLoginStateChanged; } }
private void ConfigureAuthentication() { var authProviders = new IAuthProvider[] { new ServiceStackCredentialsAuthAdapter(this.unityContainer) }; var authFeature = new AuthFeature(() => new AuthUserSession(), authProviders) { IncludeAssignRoleServices = false }; this.Plugins.Add(authFeature); }
private void ConfigureAuth(Container container) { container.Register(GetUserSession).ReusedWithin(ReuseScope.Request); container.Register(GetUserProfile).ReusedWithin(ReuseScope.Request); container.RegisterAutoWiredAs<OrmLiteAuthRepository, IAuthRepository>().ReusedWithin(ReuseScope.Request); container.RegisterAutoWiredAs<OrmLiteAuthRepository, IUserAuthRepository>().ReusedWithin(ReuseScope.Request); var auth_providers = new IAuthProvider[] { new CredentialsAuthProvider() }; var auth_feature = new AuthFeature(() => new BoilerUserSession(), auth_providers) { HtmlRedirect = "/index.html" }; Plugins.Add(auth_feature); }
public SignUpController(IPlanRepo repo, IAccountRepo accRepo, IFeatureRepo featureRepo, IUserRepo userRepo, IPurchasedFeatureRepo ppRepo, IAuthProvider auth, ICCFolderRepo folder, ICCTokenRepo token, INotificationManager notifMgr) { planRepository = repo; accountRepository = accRepo; featureRepository = featureRepo; userRepository = userRepo; ppRepository = ppRepo; authProvider = auth; CCFolderRepository = folder; CCTokenRepository = token; notifManager = notifMgr; //SetConnectionString(); }
public ZsyncLauncher(IProcessManager processManager, IPathConfiguration configuration, ZsyncOutputParser parser, IAuthProvider authProvider) { if (processManager == null) throw new ArgumentNullException("processManager"); if (configuration == null) throw new ArgumentNullException("configuration"); _authProvider = authProvider; _processManager = processManager; _parser = parser; _binPath = configuration.ToolCygwinBinPath.GetChildFileWithName("zsync.exe"); }
public AuthFeature(Func<IAuthSession> sessionFactory, IAuthProvider[] authProviders) { this.sessionFactory = sessionFactory; this.authProviders = authProviders; ServiceRoutes = new Dictionary<Type, string[]> { { typeof(AuthService), new[]{"/auth", "/auth/{provider}"} }, { typeof(AssignRolesService), new[]{"/assignroles"} }, { typeof(UnAssignRolesService), new[]{"/unassignroles"} }, }; RegisterPlugins = new List<IPlugin> { new SessionFeature() }; }
public void SetUp() { _resetPasswordService = Substitute.For<IResetPasswordService>(); _taskManager = Substitute.For<ITaskManager>(); _authenticationProvider = Substitute.For<IAuthProvider>(); _target = new ResetPasswordController(_resetPasswordService, _taskManager, _authenticationProvider); _viewContext = new ViewContext(); _viewContext.HttpContext = MockHttpContext.FakeHttpContext(); _target.SetFakeControllerContext(_viewContext.HttpContext); _target.CommitProviderInstance = Substitute.For<ICommitProvider>(); _sessionId = Guid.NewGuid().ToString().Replace("-", ""); }
public async Task GetMod(GroupContent mod, IAbsoluteDirectoryPath destination, IAbsoluteDirectoryPath packPath, StatusRepo status, IAuthProvider provider, bool force = false) { var folder = destination.GetChildDirectoryWithName(mod.PackageName); if (!folder.Exists) { await InstallNew(mod, provider, GetOpts(packPath, status, mod), folder).ConfigureAwait(false); return; } var rsyncDir = folder.GetChildDirectoryWithName(Repository.RepoFolderName); if (!force && rsyncDir.Exists && IsRightVersion(rsyncDir, mod)) return; await UpdateExisting(mod, provider, rsyncDir, folder, GetOpts(packPath, status, mod)).ConfigureAwait(false); }
public ParksController(IParksDAO parksDAO, IWeatherDAO weatherDAO, IAuthProvider authProvider) : base(authProvider) { this.ParksDAO = parksDAO; this.WeatherDAO = weatherDAO; }
public AccountController(IAuthProvider auto) { this.auto = auto; }
public BrugerController(IAuthProvider auth) { authProvider = auth; }
public GregClient(IAuthProvider provider, string packageManagerUrl) { _authProvider = provider; _client = new RestClient(packageManagerUrl); }
public static void StoreAuthResult(this IBotContext context, AuthResult authResult, IAuthProvider authProvider) => context.UserData.SetValue($"{authProvider.Name}{ContextConstants.AuthResultKey}", authResult);
public AuthController(IAuthProvider authProvider, IMapper mapper) { _authProvider = authProvider; _mapper = mapper; }
public AuthController(IAuthProvider _authProvider) { authprovider = _authProvider; }
public UserController(IAuthProvider authParam) { auth = authParam; }
public AccountController(IAuthProvider ap) { authProvider = ap; }
public AccountController(IAuthProvider authProvider) { this.authProvider = authProvider; }
public AccountsController(IUnitOfWork unitOfWork, IAccountRepository accountRepository, IAuthProvider authProvider) { _accountRepository = accountRepository ?? throw new ArgumentNullException(nameof(accountRepository)); _unitOfWork = unitOfWork ?? throw new ArgumentNullException(nameof(unitOfWork)); _authProvider = authProvider ?? throw new ArgumentNullException(nameof(authProvider)); }
public AdminController(IDeckDAL decksSqlDAL, IAuthProvider authProvider) { this.decksSqlDAL = decksSqlDAL; this.authProvider = authProvider; }
public HomeController(IAuthProvider authProvider, IDecksDAL decksDAL, ICardsDAL cardsDAL) { this.authProvider = authProvider; this.decksDAL = decksDAL; this.cardsDAL = cardsDAL; }
/// <summary> /// Uses the provided credentials when connecting to Cassandra hosts. <p> This /// should be used if the Cassandra cluster has been configured to use the /// <c>PasswordAuthenticator</c>. If the the default <c>* /// AllowAllAuthenticator</c> is used instead, using this method has no effect.</p> /// </summary> /// <param name="username"> the user name to use to login to Cassandra hosts.</param> /// <param name="password"> the password corresponding to </param> /// <returns>this Builder</returns> public Builder WithCredentials(String username, String password) { _authInfoProvider = new SimpleAuthInfoProvider().Add("username", username).Add("password", password); _authProvider = new PlainTextAuthProvider(username, password); return(this); }
public AuthDialog(IAuthProvider AuthProvider, AuthenticationOptions AuthOptions, string Prompt = "Please click to sign in: ") { this.prompt = Prompt; this.authProvider = AuthProvider; this.authOptions = AuthOptions; }
public AccountController(IAuthProvider authProvider) { _userService = new UserServiceClient(); _authProvider = authProvider; }
public AccountController(IAuthProvider auth, IUserRepository user) { this.authProvider = auth; this.userRepository = user; }
/// <summary> /// The specified <paramref name="session"/> may change as a side-effect of this method. If /// subsequent code relies on current <see cref="IAuthSession"/> data be sure to reload /// the session istance via <see cref="ServiceExtensions.GetSession(IServiceBase,bool)"/>. /// </summary> private object Authenticate(Authenticate request, string provider, IAuthSession session, IAuthProvider oAuthConfig) { if (request.provider == null && request.UserName == null) { return(null); //Just return sessionInfo if no provider or username is given } var authFeature = HostContext.GetPlugin <AuthFeature>(); var generateNewCookies = authFeature == null || authFeature.GenerateNewSessionCookiesOnAuthentication; object response = null; if (!oAuthConfig.IsAuthorized(session, session.GetOAuthTokens(provider), request)) { if (generateNewCookies) { this.Request.GenerateNewSessionCookies(session); } response = oAuthConfig.Authenticate(this, session, request); } else { if (generateNewCookies) { this.Request.GenerateNewSessionCookies(session); this.Request.SaveSession(session); } } return(response); }
public AuthInterceptor(IAuthProvider authProvider) { Guard.WhenArgument(authProvider, "authProvider").IsNull().Throw(); this.authProvider = authProvider; }
public HomeController(IRepository repository, IAuthProvider authProvider) { this.repository = repository; this.authProvider = authProvider; }
public HomeController(ILogger <HomeController> logger, IAuthProvider authProvider) : base(authProvider) { _logger = logger; }
public CrewController(IAuthProvider authParam, ICrewRepository repoCrew, IWhitelistRepository repoWhite, ILogRepository repoLog) { RepoCrew = repoCrew; RepoWhite = repoWhite; }
public AccountController(IKernel kernel, IAuthProvider auth) { authProvider = auth; }
public static bool IsAuthorizedSafe(this IAuthProvider authProvider, IAuthSession session, IAuthTokens tokens) { return(authProvider != null && authProvider.IsAuthorized(session, tokens)); }
static SecurityManager() { _settings = new Settings(); _frontEndAuthProvider = new FrontEndAuthProvider(_settings); _localhostAuthProvider = new LocalhostAuthProvider(_settings); }
public HomeController(IRecipeDAO recipeDAO, IAuthProvider authProvider) : base(authProvider) { this.recipeDAO = recipeDAO; }
public AccountController(IAuthProvider auth, IUserRepository userRepository, IFirmaRepository firmaRepository) { this._authProvider = auth; this._userRepository = userRepository; this._firmaRepository = firmaRepository; }
public AccountController(IRepository <User> users, IAuthProvider auth) { usersRepository = users; authprovider = auth; }
/// <summary> /// Use the specified AuthProvider when connecting to Cassandra hosts. <p> Use /// this method when a custom authentication scheme is in place. You shouldn't /// call both this method and {@code withCredentials}' on the same /// <c>Builder</c> instance as one will supersede the other</p> /// </summary> /// <param name="authProvider"> the <link>AuthProvider"></link> to use to login to Cassandra hosts.</param> /// <returns>this Builder</returns> public Builder WithAuthProvider(IAuthProvider authProvider) { _authProvider = authProvider; return(this); }
public AccountController(IAuthProvider auth) { authProvider = auth; }