/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* AttributeScopeMatchesShibMDScopeFunctor.cpp
*
- * A match function that ensures that an attributes value's scope matches a scope given in metadata for the entity or role.
+ * A match function that ensures that an attributes value's scope matches
+ * a scope given in metadata for the entity or role.
*/
#include "internal.h"
#include "attribute/Attribute.h"
#include "attribute/filtering/FilteringContext.h"
#include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
#include "metadata/MetadataExt.h"
+#include <saml/saml2/metadata/Metadata.h>
#include <xercesc/util/regx/RegularExpression.hpp>
using namespace opensaml::saml2md;
{
public:
bool evaluatePolicyRequirement(const FilteringContext& filterContext) const {
- return false;
+ throw AttributeFilteringException("Metadata scope matching not usable as a PolicyRequirement.");
}
bool evaluatePermitValue(const FilteringContext& filterContext, const Attribute& attribute, size_t index) const {
return false;
const Scope* rule;
- const XMLCh* widescope=NULL;
+ const XMLCh* widescope=nullptr;
const Extensions* ext = issuer->getExtensions();
if (ext) {
const vector<XMLObject*>& exts = ext->getUnknownXMLObjects();