/*
- * Copyright 2009 Internet2
+ * Copyright 2009-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
static const XMLCh formatter[] = UNICODE_LITERAL_9(f,o,r,m,a,t,t,e,r);
};
-DelegationExtractor::DelegationExtractor(const DOMElement* e) : m_attributeId("delegate"), m_formatter("$Name")
+DelegationExtractor::DelegationExtractor(const DOMElement* e)
+ : m_attributeId(XMLHelper::getAttrString(e, "delegate", attributeId)),
+ m_formatter(XMLHelper::getAttrString(e, "$Name", formatter))
{
- if (e) {
- const XMLCh* a = e->getAttributeNS(NULL, attributeId);
- if (a && *a) {
- auto_ptr_char temp(a);
- m_attributeId = temp.get();
- }
- a = e->getAttributeNS(NULL, formatter);
- if (a && *a) {
- auto_ptr_char temp(a);
- m_formatter = temp.get();
- }
- }
}
void DelegationExtractor::extractAttributes(
continue;
}
- saml2::NameID* n = NULL;
+ saml2::NameID* n = nullptr;
if ((*d)->getEncryptedID()) {
CredentialResolver* cr = application.getCredentialResolver();
if (!cr) {
try {
const XMLCh* recipient = application.getRelyingParty(
- issuer ? dynamic_cast<EntityDescriptor*>(issuer->getParent()) : NULL
+ issuer ? dynamic_cast<EntityDescriptor*>(issuer->getParent()) : nullptr
)->getXMLString("entityID").second;
Locker credlocker(cr);
if (issuer) {
}
if (n) {
- DDF val = DDF(NULL).structure();
+ DDF val = DDF(nullptr).structure();
if ((*d)->getConfirmationMethod()) {
auto_ptr_char temp((*d)->getConfirmationMethod());
val.addmember("ConfirmationMethod").string(temp.get());