Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

SAML

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

__TOC__ C# /// <summary> /// Decodes a SAML string into plain text /// SAML: XML open-standard for exchanging authorisation/authentication data btw. identity & service providers /// More info cf. http://en.wikipedia.org/wiki/Security_Assertion_Markup_Language /// SAML address the SSO problem (cf. http://en.wikipedia.org/wiki/Single_sign-on) /// </summary> /// <param name="encodedSAML">Encoded SAML string</param> /// <returns>Plaintext SAML</returns> private static string DecodeSAML(string encodedSAML) { if (encodedSAML.Contains("%")) { encodedSAML = HttpUtility.UrlDecode(encodedSAML); } byte[] decodedSAML = Convert.FromBase64String (encodedSAML); return Encoding.UTF8.GetString(decodedSAML); }