JSFiddle - React, Tailwind, and code Playground
by JayData
HTML
<script src="http://include.jaydata.org/jaydata.js"></script>
<script src="http://include.jaydata.org/datajs-1.0.3-patched.js"></script>
JavaScript
/*
var rst =
'<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"'+
'xmlns:a="http://www.w3.org/2005/08/addressing"'+
'xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">'+
'<s:Header>'+
'<a:Action s:mustUnderstand="1">http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</a:Action>'+
'<a:ReplyTo>'+
'<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>'+
'</a:ReplyTo>'+
'<a:To s:mustUnderstand="1">https://login.microsoftonline.com/extSTS.srf</a:To>'+
'<o:Security s:mustUnderstand="1"'+
'xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">'+
'<o:UsernameToken>'+
'<o:Username>[email protected]</o:Username>'+
'<o:Password>Coda3250</o:Password>'+
'</o:UsernameToken>'+
'</o:Security>'+
'</s:Header>'+
'<s:Body>'+
'<t:RequestSecurityToken xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust">'+
'<wsp:AppliesTo xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">'+
'<a:EndpointReference>'+
'<a:Address>https://avangrade.crm4.dynamics.com/</a:Address>'+
'</a:EndpointReference>'+
'</wsp:AppliesTo>'+
'<t:KeyType>http://schemas.xmlsoap.org/ws/2005/05/identity/NoProofKey</t:KeyType>'+
'<t:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</t:RequestType>'+
'<t:TokenType>urn:oasis:names:tc:SAML:1.0:assertion</t:TokenType>'+
'</t:RequestSecurityToken>'+
'</s:Body>'+
'</s:Envelope>';
var rst = "<s:Envelope xmlns:s=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:a=\"http://www.w3.org/2005/08/addressing\">" +
"<s:Header>" +
"<a:Action s:mustUnderstand=\"1\">http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue</a:Action>" +
"<a:To s:mustUnderstand=\"1\">{0}</a:To>" +
"</s:Header>" +
"<s:Body>" +
"<trust:RequestSecurityToken...