Skip to Content.
Sympa Menu

mace-opensaml-users - RE: From XMLByte to SAMLRequest

Subject: OpenSAML user discussion

List archive

RE: From XMLByte to SAMLRequest


Chronological Thread 
  • From: Scott Cantor <>
  • To: 'Manuel Sánchez Cuenca' <>,
  • Subject: RE: From XMLByte to SAMLRequest
  • Date: Wed, 16 Jun 2004 22:28:00 -0400
  • Organization: The Ohio State University

> I have got a XMLByte * representation of an SAMLRequest using
> req->toBase64, but now I have to get the original SAMLRequest
> from the XMLByte *. Can anybody tell me how I can do it?

Reading this a bit closer, if you have a base64 blob, you would need to
first decode it back into the original XML text. You can use the Xerces
Base64 class, but the decode method is very strict and will fail if there's
any whitespace, which is a pain. When I use it, I actually have to copy the
data, strip/collapse ws bytes, and then decode it.

Anyway, once you have the text, just pass the bytes into a stringstream
object on the stack and then you can use the stream constructor to build the
request.

If you need a sample, look at the SAMLPOSTProfile::accept() method. It
parses a response from base64.

-- Scott




Archive powered by MHonArc 2.6.16.

Top of Page