ws-trust

How to pass a certificate to WSTrust to get Saml Token

。_饼干妹妹 提交于 2019-12-02 03:14:10
问题 Here is an example of getting tokem using WSTrustChannelFactory. From here. var stsBinding = new WS2007HttpBinding(); stsBinding.Security.Mode = SecurityMode.TransportWithMessageCredential; stsBinding.Security.Message.EstablishSecurityContext = false; stsBinding.Security.Message.NegotiateServiceCredential = false; stsBinding.Security.Message.ClientCredentialType = MessageCredentialType.Certificate; WSTrustChannelFactory trustChannelFactory = new WSTrustChannelFactory( stsBinding , new

How to specify a certificate as the credentials for a wsTrustChannel with Thinktecture IdentityServer

佐手、 提交于 2019-11-30 09:31:26
问题 I would have thought that one could basically switch the client credentials from this: var clientCredentials = new ClientCredentials(); clientCredentials.UserName.UserName = "MyUserName" clientCredentials.UserName.Password = "MyPassword" to: var clientCredentials = new ClientCredentials(); clientCredentials.ClientCertificate.Certificate = myX509Certificate; and then create a wsTrustChannel to get a security token. wsTrustChannelFactory.SetCredentials(clientCredentials); var channel =