public ServiceCredentials() { userName = new UserNamePasswordServiceCredential(); clientCertificate = new X509CertificateInitiatorServiceCredential(); serviceCertificate = new X509CertificateRecipientServiceCredential(); windows = new WindowsServiceCredential(); this.issuedToken = new IssuedTokenServiceCredential(); this.secureConversation = new SecureConversationServiceCredential(); exceptionMapper = new ExceptionMapper(); }
public ServiceCredentials() { UserNameAuthentication = new UserNamePasswordServiceCredential(); ClientCertificate = new X509CertificateInitiatorServiceCredential(); ServiceCertificate = new X509CertificateRecipientServiceCredential(); WindowsAuthentication = new WindowsServiceCredential(); IssuedTokenAuthentication = new IssuedTokenServiceCredential(); SecureConversationAuthentication = new SecureConversationServiceCredential(); _exceptionMapper = new ExceptionMapper(); }
public ServiceCredentials() { this.userName = new UserNamePasswordServiceCredential(); this.clientCertificate = new X509CertificateInitiatorServiceCredential(); this.serviceCertificate = new X509CertificateRecipientServiceCredential(); this.windows = new WindowsServiceCredential(); this.issuedToken = new IssuedTokenServiceCredential(); this.peer = new PeerCredential(); this.secureConversation = new SecureConversationServiceCredential(); }
protected ServiceCredentials(ServiceCredentials other) { if (other == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("other"); } this.userName = new UserNamePasswordServiceCredential(other.userName); this.clientCertificate = new X509CertificateInitiatorServiceCredential(other.clientCertificate); this.serviceCertificate = new X509CertificateRecipientServiceCredential(other.serviceCertificate); this.windows = new WindowsServiceCredential(other.windows); this.issuedToken = new IssuedTokenServiceCredential(other.issuedToken); this.peer = new PeerCredential(other.peer); this.secureConversation = new SecureConversationServiceCredential(other.secureConversation); }
protected ServiceCredentials(ServiceCredentials other) { if (other == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(other)); } UserNameAuthentication = new UserNamePasswordServiceCredential(other.UserNameAuthentication); ClientCertificate = new X509CertificateInitiatorServiceCredential(other.ClientCertificate); ServiceCertificate = new X509CertificateRecipientServiceCredential(other.ServiceCertificate); WindowsAuthentication = new WindowsServiceCredential(other.WindowsAuthentication); IssuedTokenAuthentication = new IssuedTokenServiceCredential(other.IssuedTokenAuthentication); SecureConversationAuthentication = new SecureConversationServiceCredential(other.SecureConversationAuthentication); _saveBootstrapTokenInSession = other._saveBootstrapTokenInSession; _exceptionMapper = other._exceptionMapper; }
protected ServiceCredentials(ServiceCredentials other) { if (other == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(other)); } userName = new UserNamePasswordServiceCredential(other.userName); clientCertificate = new X509CertificateInitiatorServiceCredential(other.clientCertificate); serviceCertificate = new X509CertificateRecipientServiceCredential(other.serviceCertificate); windows = new WindowsServiceCredential(other.windows); this.issuedToken = new IssuedTokenServiceCredential(other.issuedToken); this.secureConversation = new SecureConversationServiceCredential(other.secureConversation); saveBootstrapTokenInSession = other.saveBootstrapTokenInSession; exceptionMapper = other.exceptionMapper; }
internal void ApplyConfiguration(SecureConversationServiceCredential secureConversation) { if (secureConversation == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("secureConversation"); } if (!string.IsNullOrEmpty(this.SecurityStateEncoderType)) { Type c = Type.GetType(this.SecurityStateEncoderType, true); if (!typeof(SecurityStateEncoder).IsAssignableFrom(c)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(System.ServiceModel.SR.GetString("ConfigInvalidSecurityStateEncoderType", new object[] { this.SecurityStateEncoderType, typeof(SecurityStateEncoder).ToString() }))); } secureConversation.SecurityStateEncoder = (SecurityStateEncoder)Activator.CreateInstance(c); } }
private void Snippet2() { //<snippet2> // Create a service host. Uri httpUri = new Uri("http://localhost/Calculator"); ServiceHost sh = new ServiceHost(typeof(Calculator), httpUri); // Create a binding that uses a WindowsServiceCredential . WSHttpBinding b = new WSHttpBinding(SecurityMode.Message); b.Security.Message.ClientCredentialType = MessageCredentialType.Windows; // Add an endpoint. sh.AddServiceEndpoint(typeof(ICalculator), b, "WindowsCalculator"); // Get a reference to the WindowsServiceCredential object. SecureConversationServiceCredential ssCredential = sh.Credentials.SecureConversationAuthentication; //</snippet2> }