}
};
-void SAML1MessageRule::evaluate(const XMLObject& message, const GenericRequest* request, SecurityPolicy& policy) const
+bool SAML1MessageRule::evaluate(const XMLObject& message, const GenericRequest* request, SecurityPolicy& policy) const
{
Category& log=Category::getInstance(SAML_LOGCAT".SecurityPolicyRule.SAML1Message");
if (!protocol) {
log.warn("issuer identity not extracted");
- return;
+ return false;
}
if (log.isDebugEnabled()) {
if (!entity) {
auto_ptr_char temp(policy.getIssuer()->getName());
log.warn("no metadata found, can't establish identity of issuer (%s)", temp.get());
- return;
+ return false;
}
log.debug("matched message issuer against metadata, searching for applicable role...");
const RoleDescriptor* roledesc=entity->getRoleDescriptor(*policy.getRole(), protocol);
if (!roledesc) {
log.warn("unable to find compatible role (%s) in metadata", policy.getRole()->toString().c_str());
- return;
+ return false;
}
policy.setIssuerMetadata(roledesc);
+ return true;
}
}
catch (bad_cast&) {
// Just trap it.
log.warn("caught a bad_cast while examining message");
}
+
+ return false;
}