-
Slight noob alert here... I'm trying to implement an SSO endpoint where I receive the SAML response from my IDP. How can I extract the XML data from the request body? Edit: I'm trying to implement SSO in one of my apps. After a successful authorisation, my IDP sends an XML request to my ACS endpoint. I don't know where to begin looking for where the data could be hidden inside the request body. I get a <samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="_8e8dc5f69a98cc4c1ff3427e5ce34606fd672f91e6" Version="2.0" IssueInstant="2014-07-17T01:01:48Z" Destination="http://sp.example.com/demo1/index.php?acs" InResponseTo="ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685">
<saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer>
<samlp:Status>
<samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>
</samlp:Status> Is there any (easy) way to exctract said data, something what ideally an imaginary |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Silly me, it was a base64 encoded response, but I didn't uri decode it, so I was getting gibberish. This solved it for me: const response = decodeURIComponent((await request.text()).replace('SAMLResponse=', '')) |
Beta Was this translation helpful? Give feedback.
Silly me, it was a base64 encoded response, but I didn't uri decode it, so I was getting gibberish. This solved it for me: