X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fopensaml2.git;a=blobdiff_plain;f=saml%2Fbinding%2FSecurityPolicy.h;h=fed55f7f74b9c01bc14dae49d3a5b3705eb41cfd;hp=5f696a9f0e89cf6aa78e8e823f97291a19e15554;hb=80118fcbdf5d121c495f4db3246c150275641f74;hpb=da57a13a715c901bca24ce3402f53d1e117fd1b4 diff --git a/saml/binding/SecurityPolicy.h b/saml/binding/SecurityPolicy.h index 5f696a9..fed55f7 100644 --- a/saml/binding/SecurityPolicy.h +++ b/saml/binding/SecurityPolicy.h @@ -76,7 +76,7 @@ namespace opensaml { const xmltooling::TrustEngine* trustEngine=NULL, bool validate=true ) : m_messageID(NULL), m_issueInstant(0), m_issuer(NULL), m_issuerRole(NULL), m_authenticated(false), - m_matchingPolicy(NULL), m_metadata(metadataProvider), m_role(NULL), m_trust(trustEngine), m_validate(validate) { + m_matchingPolicy(NULL), m_metadata(metadataProvider), m_role(NULL), m_trust(trustEngine), m_validate(validate), m_entityOnly(true) { if (role) m_role = new xmltooling::QName(*role); } @@ -117,7 +117,16 @@ namespace opensaml { */ bool getValidating() const { return m_validate; - } + } + + /** + * Returns flag controlling non-entity issuer support. + * + * @return flag controlling non-entity issuer support + */ + bool requireEntityIssuer() const { + return m_entityOnly; + } /** * Gets a mutable array of installed policy rules. @@ -168,6 +177,15 @@ namespace opensaml { void setValidating(bool validate=true) { m_validate = validate; } + + /** + * Sets flag controlling non-entity issuer support. + * + * @param entityOnly require that Issuer be in entity format + */ + void requireEntityIssuer(bool entityOnly=true) { + m_entityOnly = entityOnly; + } /** * Evaluates the policy against the given request and message, @@ -361,6 +379,7 @@ namespace opensaml { xmltooling::QName* m_role; const xmltooling::TrustEngine* m_trust; bool m_validate; + bool m_entityOnly; }; };