/*
- * Copyright 2001-2006 Internet2
+ * Copyright 2001-2007 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
#include "internal.h"
-#include "SAMLArtifact.h"
+#include "binding/SAMLArtifact.h"
#include "saml2/metadata/Metadata.h"
#include "saml2/metadata/AbstractMetadataProvider.h"
const vector<IDPSSODescriptor*>& roles=const_cast<const EntityDescriptor*>(site)->getIDPSSODescriptors();
for (vector<IDPSSODescriptor*>::const_iterator i=roles.begin(); i!=roles.end(); i++) {
// SAML 1.x?
- if ((*i)->hasSupport(SAMLConstants::SAML10_PROTOCOL_ENUM) || (*i)->hasSupport(SAMLConstants::SAML11_PROTOCOL_ENUM)) {
+ if ((*i)->hasSupport(samlconstants::SAML10_PROTOCOL_ENUM) || (*i)->hasSupport(samlconstants::SAML11_PROTOCOL_ENUM)) {
// Check for SourceID extension element.
const Extensions* exts=(*i)->getExtensions();
- if (exts) {
- const list<XMLObject*>& children=exts->getXMLObjects();
- for (list<XMLObject*>::const_iterator ext=children.begin(); ext!=children.end(); ext++) {
+ if (exts && exts->hasChildren()) {
+ const vector<XMLObject*>& children=exts->getUnknownXMLObjects();
+ for (vector<XMLObject*>::const_iterator ext=children.begin(); ext!=children.end(); ++ext) {
SourceID* sid=dynamic_cast<SourceID*>(*ext);
if (sid) {
auto_ptr_char sourceid(sid->getID());
}
// SAML 2.0?
- if ((*i)->hasSupport(SAMLConstants::SAML20P_NS)) {
+ if ((*i)->hasSupport(samlconstants::SAML20P_NS)) {
// Hash the ID.
m_sources.insert(
pair<string,const EntityDescriptor*>(SAMLConfig::getConfig().hashSHA1(id.get(), true),site)