Adding XML inside Extensions
See original GitHub issueI’m trying to create a Saml2AuthnRequest using PostBinding, by following the examples I was able to create the request.
My only problem is that the IdP I’m working with requires me to send a piece of XML inside the Extensions node and when I put the XML as string, the text ends up being encoded
For instance, if I create the Extensions like this…
var extensions = new Extensions()
{
Data = "<TSP-ID>-</TSP-ID><TSP-TYPE>-</TSP-TYPE>"
}
…the Extensions node ends up being set like the below
<saml2p:Extensions xmlns="urn:oasis:names:tc:SAML:2.0:protocol"><TSP-ID>-</TSP-ID><TSP-TYPE>-</TSP-TYPE></saml2p:Extensions>
which is not what the IdP expects
I looked at the code in Extensions and I can see the XElement just adds the string (see here)
Is there anyway to add XML in Extensions or this requires a code change in the library?
Thanks
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Is it possible to add an .XML file in Chrome Extension ...
You can have any data you want in your extension package. All you need is to either expose that file via web_accessible_resources so...
Read more >Open XML Formats and file name extensions
By default, documents, worksheets, and presentations that you create in Office are saved in XML format with file name extensions that add an...
Read more >Lesson 5: Modify the plugin.xml file
xml file, select the Extensions tab from the list of tabs at the bottom. Click Add. In the New Extension dialog box that...
Read more >XML Schema extension Element
The extension element extends an existing simpleType or complexType element. Element Information. Parent elements: simpleContent, complexContent. Syntax. < ...
Read more >Using XML Extensions in SQL Developer to Extend ...
Now go into the Preferences and add this file to the User Defined Extensions as an 'Action.' Restart SQL Developer and right-click on...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thanks for getting back. I have released the support in a beta https://github.com/ITfoxtec/ITfoxtec.Identity.Saml2/releases/tag/4.7.1-beta1
I have implemented a solution, please take a look at the https://github.com/ITfoxtec/ITfoxtec.Identity.Saml2/commit/d929c88f77a19702e9c914c7a25ffaf96ffe44f1 commit and let me know if it works for you.
The requested XML is added to the TestWebAppCore sample in the AppExtensions.cs. The TestWebAppCore sample should generate the following XML if you uncomment the
Extensions = new AppExtensions(),line in AuthController.cs: