public AuthenticationContextService(BaseLibrary.Web.IWebContext webContext,
			IAuthenticationContextInitializer[] authenticationContextInitializers,
			AdminSection adminConfig)
        {
            _webContext = webContext;
            _adminConfig = adminConfig;

            AuthenticationSection authSection = WebConfigurationManager.GetSection("zeus/authentication") as AuthenticationSection;
            if (authSection == null)
                authSection = new AuthenticationSection(_adminConfig);
            _rootLocation = authSection.ToAuthenticationLocation();

            foreach (IAuthenticationContextInitializer initializer in authenticationContextInitializers)
                initializer.Initialize(this);
        }
Example #2
0
 internal AuthenticationLocation ToAuthenticationLocation()
 {
     AuthenticationLocation location = new AuthenticationLocation();
     location.Enabled = Enabled;
     location.CookieDomain = Domain;
     location.CookiePath = Path;
     location.DefaultUrl = DefaultUrl;
     location.LoginUrl = LoginUrl;
     location.Name = Name;
     location.RequireSsl = RequireSsl;
     location.SlidingExpiration = SlidingExpiration;
     location.Timeout = Timeout;
     return location;
 }
 public void AddLocation(AuthenticationLocation location)
 {
     _rootLocation.ChildLocations.Add(location);
 }
Example #4
0
 public AuthenticationService(BaseLibrary.Web.IWebContext webContext, AuthenticationLocation config, string loginUrl)
 {
     _webContext = webContext;
     _config = config;
     _loginUrl = loginUrl;
 }