Jugo

Jugo

  • NA
  • 3
  • 0

WCF client - STS service

Sep 1 2009 8:10 AM
Hi,

I need to make WCF client who will retrive SAML token from STS from which i have address of handler ashx.
The message whould be only signed by custom Username token.

I can't use WSFederationHttpBinding because it will do all the job from me for taking the token and processing the message to the service. I need to get onlu SAML token from STS.

Until now i have tried to set custom binding and behavior with all settings need it:
- username and password for client certificate
- x509 token for service certificate
And i am using IssuedSecurityTokenProvider class for retrieving the token.

But the message when i am sending it is signed and encrypted.

So i have few problems:

1. How to change the ProtectionLevel to be "Sign" in custom binding?
It is always using SignAndEncrypt and i get error: "The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error."

2. How to add the custom Username token into the header (like "AnyElements" property in WSE)? Now in the header in security section i have UsernameToken with username and password which are ClientCredenctials username and password.

3. Is it ok to use IssuedSecurityTokenProvider class for retrieving SAML token? With this class i need to call GetToken() method.

If someone know a page where i can see examples or if he can give me an example for any of this issues i will appreciate.


Thanks

Answers (2)