nameid->setFormat(format.get() ? format.get() : NameID::TRANSIENT);\r
nameid->setNameQualifier(domain.get());\r
iss->setName(issuer.get());\r
- SAML2SOAPClient client(soaper);\r
+ SAML2SOAPClient client(soaper, false);\r
client.sendSAML(query, mcc, loc.get());\r
srt = client.receiveSAML();\r
}\r
}\r
\r
if (!srt)\r
- throw BindingException("Unable to successfully query for attributes.");\r
+ throw BindingException("Unable to obtain a SAML response from attribute authority.");\r
+ else if (!XMLString::equals(srt->getStatus()->getStatusCode()->getValue(), saml2p::StatusCode::SUCCESS)) {\r
+ delete srt;\r
+ throw BindingException("Attribute authority returned a SAML error.");\r
+ }\r
const opensaml::saml2p::Response* response = dynamic_cast<opensaml::saml2p::Response*>(srt);\r
\r
const vector<opensaml::saml2::Assertion*>& assertions = response->getAssertions();\r
nameid->setNameQualifier(domain.get());\r
query->setResource(issuer.get());\r
request->setMinorVersion(ver==v11 ? 1 : 0);\r
- SAML1SOAPClient client(soaper);\r
+ SAML1SOAPClient client(soaper, false);\r
client.sendSAML(request, mcc, loc.get());\r
response = client.receiveSAML();\r
}\r
}\r
\r
if (!response)\r
- throw BindingException("Unable to successfully query for attributes.");\r
+ throw BindingException("Unable to obtain a SAML response from attribute authority.");\r
+ else if (*(response->getStatus()->getStatusCode()->getValue()) != saml1p::StatusCode::SUCCESS) {\r
+ delete const_cast<opensaml::saml1p::Response*>(response);\r
+ throw BindingException("Attribute authority returned a SAML error.");\r
+ }\r
\r
const vector<opensaml::saml1::Assertion*>& assertions = response->getAssertions();\r
if (assertions.size())\r