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: "Mark Wilcox" <>
  • To: "'Scott Cantor'" <>, 'Manuel Sánchez Cuenca' <>, <>
  • Subject: RE: From XMLByte to SAMLRequest
  • Date: Wed, 16 Jun 2004 22:35:08 -0400
  • Importance: Normal

If you have to play around with the Base64 encoded data, you may want to
grab the Jakarta Commons Codec from Jakarta.apache.org. That's what I've
been using and it's definitely made B64 stuff a non-issue.

Mark

> -----Original Message-----
> From: Scott Cantor
> [mailto:]
> Sent: Wednesday, June 16, 2004 10:28 PM
> To: 'Manuel Sánchez Cuenca';
>
> Subject: RE: From XMLByte to SAMLRequest
>
> > 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