예제 #1
0
        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);
        }
예제 #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;
 }
예제 #3
0
 public void AddLocation(AuthenticationLocation location)
 {
     _rootLocation.ChildLocations.Add(location);
 }
예제 #4
0
 public AuthenticationService(BaseLibrary.Web.IWebContext webContext, AuthenticationLocation config, string loginUrl)
 {
     _webContext = webContext;
     _config = config;
     _loginUrl = loginUrl;
 }