public DefaultSecurityTokenManager(DefaultServiceCredentials serverCreds) : base(serverCreds) { this.serverCreds = serverCreds; }
public DefaultServiceCredentials(DefaultServiceCredentials other) : base(other) { }
private CoordinationServiceHost CreateService(object dispatcher, System.Type contract, string pathSuffix) { Binding namedPipeActivationBinding; ServiceCredentials serviceCredentials; CoordinationServiceHost host = new CoordinationServiceHost(this, dispatcher) { InternalBaseAddresses = { this.httpsBaseAddressUri } }; ServiceAuthorizationBehavior behavior = host.Description.Behaviors.Find <ServiceAuthorizationBehavior>(); behavior.PrincipalPermissionMode = PrincipalPermissionMode.None; behavior.ServiceAuthorizationManager = this.globalAclAuthz; if (dispatcher is IWSActivationCoordinator) { host.InternalBaseAddresses.Add(this.namedPipeBaseAddressUri); namedPipeActivationBinding = this.namedPipeActivationBinding; host.AddServiceEndpoint(contract, namedPipeActivationBinding, pathSuffix); if (this.config.RemoteClientsEnabled) { namedPipeActivationBinding = this.windowsActivationBinding; host.AddServiceEndpoint(contract, namedPipeActivationBinding, pathSuffix + "Remote/"); } namedPipeActivationBinding = this.interopActivationBinding; serviceCredentials = new DefaultServiceCredentials(); } else if (dispatcher is IWSRegistrationCoordinator) { namedPipeActivationBinding = this.interopRegistrationBinding; if (this.config.SupportingTokensEnabled) { serviceCredentials = this.interopRegistrationBinding.SupportingTokenBindingElement.ServiceCredentials; } else { serviceCredentials = new DefaultServiceCredentials(); } } else { namedPipeActivationBinding = this.interopDatagramBinding; serviceCredentials = new DefaultServiceCredentials(); } host.AddServiceEndpoint(contract, namedPipeActivationBinding, pathSuffix); serviceCredentials.WindowsAuthentication.IncludeWindowsGroups = true; serviceCredentials.ServiceCertificate.Certificate = this.config.X509Certificate; serviceCredentials.ClientCertificate.Certificate = this.config.X509Certificate; host.Description.Behaviors.Add(serviceCredentials); ServiceMetadataBehavior behavior2 = host.Description.Behaviors.Find <ServiceMetadataBehavior>(); if (behavior2 != null) { if (DebugTrace.Verbose) { DebugTrace.Trace(TraceLevel.Verbose, "Disabling WS-MeX support"); } behavior2.HttpGetEnabled = false; behavior2.HttpsGetEnabled = false; } ServiceDebugBehavior behavior3 = host.Description.Behaviors.Find <ServiceDebugBehavior>(); if (behavior3 != null) { if (DebugTrace.Verbose) { DebugTrace.Trace(TraceLevel.Verbose, "Disabling WS-MeX support"); } behavior3.HttpHelpPageEnabled = false; behavior3.HttpsHelpPageEnabled = false; } return(host); }