projects
/
shibboleth
/
cpp-opensaml.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7960a4d
)
Register builders/validators for metadata extensions.
author
Scott Cantor
<cantor.2@osu.edu>
Sat, 9 Oct 2010 21:42:33 +0000
(21:42 +0000)
committer
Scott Cantor
<cantor.2@osu.edu>
Sat, 9 Oct 2010 21:42:33 +0000
(21:42 +0000)
saml/saml2/metadata/impl/MetadataSchemaValidators.cpp
patch
|
blob
|
history
diff --git
a/saml/saml2/metadata/impl/MetadataSchemaValidators.cpp
b/saml/saml2/metadata/impl/MetadataSchemaValidators.cpp
index
97e221a
..
f96f791
100644
(file)
--- a/
saml/saml2/metadata/impl/MetadataSchemaValidators.cpp
+++ b/
saml/saml2/metadata/impl/MetadataSchemaValidators.cpp
@@
-38,6
+38,9
@@
using samlconstants::SAML20MD_QUERY_EXT_NS;
using samlconstants::SAML20MD_ALGSUPPORT_NS;
using samlconstants::SAML20MD_ENTITY_ATTRIBUTE_NS;
using samlconstants::SAML20MD_UI_NS;
using samlconstants::SAML20MD_ALGSUPPORT_NS;
using samlconstants::SAML20MD_ENTITY_ATTRIBUTE_NS;
using samlconstants::SAML20MD_UI_NS;
+using samlconstants::SAML1MD_NS;
+using samlconstants::IDP_DISCOVERY_PROTOCOL_NS;
+using samlconstants::SP_REQUEST_INIT_NS;
namespace opensaml {
namespace saml2md {
namespace opensaml {
namespace saml2md {
@@
-259,6
+262,14
@@
namespace opensaml {
XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,SourceID);
XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,SourceID);
+ BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,DiscoveryResponse,IndexedEndpointType);
+ IndexedEndpointTypeSchemaValidator::validate(xmlObject);
+ END_XMLOBJECTVALIDATOR;
+
+ BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,RequestInitiator,EndpointType);
+ EndpointTypeSchemaValidator::validate(xmlObject);
+ END_XMLOBJECTVALIDATOR;
+
BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,EntityAttributes);
if (!ptr->hasChildren())
throw ValidationException("EntityAttributes must contain at least one child element.");
BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,EntityAttributes);
if (!ptr->hasChildren())
throw ValidationException("EntityAttributes must contain at least one child element.");
@@
-396,10
+407,18
@@
void opensaml::saml2md::registerMetadataClasses() {
q=xmltooling::QName(SAML20MD_NS,xmlencryption::EncryptionMethod::LOCAL_NAME);
XMLObjectBuilder::registerBuilder(q,new xmlencryption::EncryptionMethodBuilder());
q=xmltooling::QName(SAML20MD_NS,xmlencryption::EncryptionMethod::LOCAL_NAME);
XMLObjectBuilder::registerBuilder(q,new xmlencryption::EncryptionMethodBuilder());
- q=xmltooling::QName(
samlconstants::
SAML1MD_NS,SourceID::LOCAL_NAME);
+ q=xmltooling::QName(SAML1MD_NS,SourceID::LOCAL_NAME);
XMLObjectBuilder::registerBuilder(q,new SourceIDBuilder());
SchemaValidators.registerValidator(q,new SourceIDSchemaValidator());
XMLObjectBuilder::registerBuilder(q,new SourceIDBuilder());
SchemaValidators.registerValidator(q,new SourceIDSchemaValidator());
+ q=xmltooling::QName(IDP_DISCOVERY_PROTOCOL_NS,DiscoveryResponse::LOCAL_NAME);
+ XMLObjectBuilder::registerBuilder(q,new DiscoveryResponseBuilder());
+ SchemaValidators.registerValidator(q,new DiscoveryResponseSchemaValidator());
+
+ q=xmltooling::QName(SP_REQUEST_INIT_NS,RequestInitiator::LOCAL_NAME);
+ XMLObjectBuilder::registerBuilder(q,new RequestInitiatorBuilder());
+ SchemaValidators.registerValidator(q,new RequestInitiatorSchemaValidator());
+
q=xmltooling::QName(SAML20MD_QUERY_EXT_NS,ActionNamespace::LOCAL_NAME);
XMLObjectBuilder::registerBuilder(q,new ActionNamespaceBuilder());
SchemaValidators.registerValidator(q,new ActionNamespaceSchemaValidator());
q=xmltooling::QName(SAML20MD_QUERY_EXT_NS,ActionNamespace::LOCAL_NAME);
XMLObjectBuilder::registerBuilder(q,new ActionNamespaceBuilder());
SchemaValidators.registerValidator(q,new ActionNamespaceSchemaValidator());