static Global() { CommitId = ConfigurationManager.AppSettings.Get("appharbor.commit_id"); var settings = LoadSettings(); var integrationPath = settings["DataPath"]; var contracts = Contracts.CreateStreamer(); var strategy = new DocumentStrategy(); if (integrationPath.StartsWith("file:")) { var path = integrationPath.Remove(0, 5); var config = FileStorage.CreateConfig(path); Docs = config.CreateNuclear(strategy).Container; Client = new WebEndpoint(new NuclearStorage(Docs), contracts, config.CreateQueueWriter(Topology.RouterQueue)); } else if (integrationPath.StartsWith("azure:")) { var path = integrationPath.Remove(0, 6); var config = AzureStorage.CreateConfig(path); Docs = config.CreateNuclear(strategy).Container; Client = new WebEndpoint(new NuclearStorage(Docs), contracts, config.CreateQueueWriter(Topology.RouterQueue)); } else { throw new InvalidOperationException("Unsupported environment"); } Forms = new FormsAuth(Docs.GetReader <UserId, LoginView>()); Auth = new WebAuth(Client); }
public WebAuth(WebEndpoint webEndpoint) { _webEndpoint = webEndpoint; }