encryption - How decrypt SAML token -


This is a desktop application, it seems that work but in the end, the token return encrypted shell will let you know how to decrypt it

  class program {static zero major (string [] ARG) {ServicePointManager.ServerCertificateValidationCallback + = RemoteCertificateValidationCallback; Var samlToken = GetSamlToken ("@ domain", "@login", "@password"); Console.WriteLine (Uri.UnescapeDataString (samlToken)); Console.ReadLine (); } Private Static Hair Remote Curtain ValidationColoback (Object Sender, X509 Certificate Certificate, X509 Chen Chain, SSL PoliciesErshServerArtists) {Return to SSL Policy ERROR} SSL Policy IRRORS NON || String Eulouls (Certificate: ISOUUUR, "CN = Name", String Companion. Inverralial Culture Ignore Seas); } Private Static String GetSamlToken (String Domain, String Username, String Password) {var acsUrl = "@RPURL"; Var stsUrl = "@ssurl"; WSTrustChannelFactory TrustChannelFactory = NewWSTrustChannelFactory (new WindowsWSTrustBinding (SecurityMode.TransportWithMessageCredential), new Endpoint Address (new URI (stsUrl)); Trust Channel Factor TrustWarsian = Trust version.strst 13; Trust Channel Factor Credentials. Windows Client Credentials Domain = domain; TrustChannelFactory.Credentials.Windows.ClientCredential.UserName = userName; TrustChannelfactory.Credentials.Windows.ClientCredential.Password = Password; {RequestSecurityTokenRST = New RequestSecurityTry (WSTrust13Constants.RequestTypes.Issue, WSTrust13Constants.KeyTypes.Bearer); Rst.AppliesTo = new endpoint (ACSURL); Rst.TokenType = Microsoft.IdentityModel.Tokens.SecurityToken.Templates.Saml2TokenProfile11; WSTrustChannel Channel = (WSTrustChannel) trustChannelFactory.CreateChannel (); GenericXmlSecurityToken Token = channel.Issue (rst) GenericXmlSecurityToken; String token string = token.token.opxx; Return token string; } Finally {TrustChannelFactory.Close (); }}}   

thanks

check < / Div>

Comments