This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var wsTrustClient = new WsTrustClient("devtest-idp.vfltest.dk"); | |
var audience = "https://devtest-ws-dli.vfltest.dk/UserServices/"; | |
var token = (GenericXmlSecurityToken)wsTrustClient.GetSecurityToken(audience, "<service account>", "<service account password>"); | |
var tokenXml = token.TokenXml.OuterXml; | |
var encodedToken = new DeflatedSamlTokenHeaderEncoder().Encode(tokenXml); | |
Console.WriteLine(tokenXml); | |
Console.WriteLine(encodedToken); | |
using (var client = new HttpClient()) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IdentityModel.Protocols.WSTrust; | |
using System.IdentityModel.Tokens; | |
using System.Reflection; | |
using System.Security.Claims; | |
using System.Security.Cryptography.X509Certificates; | |
using System.ServiceModel; | |
using System.ServiceModel.Security; | |
using System.Text.RegularExpressions; | |
using System.Threading; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IdentityModel; | |
using System.Reflection; | |
using System.Text; | |
using System.Web; | |
namespace Samples | |
{ | |
/// <summary> | |
/// A "DeflatedSaml" token header encoder. DeflatedSaml is a semi-standard, in that the encoding/compression steps are described in the SAML standards. |
NewerOlder