internal static SecuritySetting GetClusterSecurityDetails() { if (instance == null) { lock (instanceCreationLockObject) { if (instance == null) { instance = new SecuritySetting(); } } } return(instance); }
internal static SecuritySetting GetClusterSecurityForTesting(EndpointProtocol endpointProtocol) { if (instance == null) { lock (instanceCreationLockObject) { if (instance == null) { instance = new SecuritySetting(endpointProtocol); } } } return(instance); }
public Task <string> OpenAsync(CancellationToken cancellationToken) { var endpoint = this.serviceContext.CodePackageActivationContext.GetEndpoint("RestEndpoint"); var fabricSecuritySetting = SecuritySetting.GetClusterSecurityDetails(); var listeningAddress = String.Format(CultureInfo.InvariantCulture, "{0}://+:{1}/", fabricSecuritySetting.EndpointProtocol, endpoint.Port); var publishUri = listeningAddress.Replace("+", FabricRuntime.GetNodeContext().IPAddressOrFQDN); this.owinHttpServer = new OwinHttpServer(this.currentRuntime, fabricSecuritySetting, cancellationToken); this.owinHttpServer.StartOwinHttpServer(listeningAddress); EventStoreLogger.Logger.LogMessage("Uri: {0}", publishUri); return(Task.FromResult(publishUri)); }
internal Startup(EventStoreRuntime currentRuntime, SecuritySetting securitySetting, CancellationToken cancellationToken) { this.controllerSetting = new ControllerSetting(currentRuntime, cancellationToken); this.fabricSecuritySetting = securitySetting; }
internal OwinHttpServer(EventStoreRuntime currentRuntime, SecuritySetting fabricBrSecuritySetting, CancellationToken cancellationToken) { this.owinStartup = new Startup(currentRuntime, fabricBrSecuritySetting, cancellationToken); }