mace-opensaml-users - RE: Validating a SAML assertion with openSAML 1.1 (C++)
Subject: OpenSAML user discussion
List archive
- From: "Scott Cantor" <>
- To: "'Austen Ito'" <>, <>
- Subject: RE: Validating a SAML assertion with openSAML 1.1 (C++)
- Date: Thu, 22 Jun 2006 23:33:54 -0400
- Organization: The Ohio State University
> 1. Create a SAML object from an XML Source.
> 2. Validate the SAML object against a schema.
> 3. Be able to access the information from the elements within the XML
> source.
>
> Does that clear it up a bit? Thanks for your help.
Yes, if by validate you mean in a schema sense, that's not optional in that
version. 2.0 makes validation optional, but 1.1 only parses against the
schema.
You can find examples in the signtest tool.
Parsing is done manually with the XML::ParserPool class and you can also
create objects from streams, which is simpler.
ifstream in(filename);
SAMLAssertion* assertion = new SAMLAssertion(in);
...
delete assertion;
That's it. If the XML isn't valid, a SAMLException is thrown.
signtest demonstrates library setup/shutdown and setting the schema path,
which is required.
There are limits to the consistency of the object model, not every element
is modeled as its own object as in the new version of the library and there
are more quirks.
I'd suggest trying the new code instead, but it's harder to set up at this
point, and requires some unreleased dependencies.
-- Scott
- Validating a SAML assertion with openSAML 1.1 (C++), Austen Ito, 06/22/2006
- RE: Validating a SAML assertion with openSAML 1.1 (C++), Scott Cantor, 06/22/2006
- RE: Validating a SAML assertion with openSAML 1.1 (C++), Austen Ito, 06/22/2006
- RE: Validating a SAML assertion with openSAML 1.1 (C++), Scott Cantor, 06/22/2006
- RE: Validating a SAML assertion with openSAML 1.1 (C++), Austen Ito, 06/22/2006
- RE: Validating a SAML assertion with openSAML 1.1 (C++), Scott Cantor, 06/22/2006
Archive powered by MHonArc 2.6.16.