I configured Thintecture Identity Server with identity federation (google, facebook, live id), and WCF SOAP service.
Now I need WCF Rest Endpoint (webHttpBinding) for Windows Phone application. I don't want to pass WSTrust SAML token in authorization header. Is possible to convert SamlToken into JWT token and how:)?
Below is code I tried, but doesn't work.
var factory = new WSTrustChannelFactory(
new WindowsWSTrustBinding(SecurityMode.Transport),
new EndpointAddress("https://identityserver.local/issue/???"))
{
TrustVersion = TrustVersion.WSTrust13
};
var rst = new RequestSecurityToken
{
RequestType = RequestTypes.Issue,
KeyType = KeyTypes.Bearer,
TokenType = TokenTypes.JsonWebToken,
AppliesTo = new EndpointReference("http://my.realm/")
};
var securityToken = xmlToken.ToSecurityToken();
var response = factory.CreateChannelWithIssuedToken(securityToken).Issue(rst);
Thanks for help.