From 5b9656707884415c92a78055a1e1ca7022b14ef4 Mon Sep 17 00:00:00 2001 From: Olav Morken <olav.morken@uninett.no> Date: Mon, 17 Dec 2007 14:56:22 +0000 Subject: [PATCH] SAML2:AuthnResponse - Made SAML2_ASSERT_NS and SAML2_PROTOCOL_NS constants of the class instead of run-time defines. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@119 44740490-163a-0410-bde0-09ae8108e29a --- lib/SimpleSAML/XML/SAML20/AuthnResponse.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/SimpleSAML/XML/SAML20/AuthnResponse.php b/lib/SimpleSAML/XML/SAML20/AuthnResponse.php index 986fbc5a1..e8f890e85 100644 --- a/lib/SimpleSAML/XML/SAML20/AuthnResponse.php +++ b/lib/SimpleSAML/XML/SAML20/AuthnResponse.php @@ -37,6 +37,13 @@ class SimpleSAML_XML_SAML20_AuthnResponse extends SimpleSAML_XML_AuthnResponse { const TRANSIENT = 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient'; const EMAIL = 'urn:oasis:names:tc:SAML:2.0:nameid-format:email'; + + /* Namespaces used in the XML representation of this object. + * TODO: Move these constants into a generic SAML2-class? + */ + const SAML2_ASSERT_NS = 'urn:oasis:names:tc:SAML:2.0:assertion'; + const SAML2_PROTOCOL_NS = 'urn:oasis:names:tc:SAML:2.0:protocol'; + function __construct(SimpleSAML_Configuration $configuration, SimpleSAML_XML_MetaDataStore $metadatastore) { @@ -196,9 +203,6 @@ class SimpleSAML_XML_SAML20_AuthnResponse extends SimpleSAML_XML_AuthnResponse { $base64 = isset($md['base64attributes']) ? $md['base64attributes'] : false; - define('SAML2_ASSERT_NS', 'urn:oasis:names:tc:SAML:2.0:assertion'); - define('SAML2_PROTOCOL_NS', 'urn:oasis:names:tc:SAML:2.0:protocol'); - define('SAML2_BINDINGS_POST', 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST'); define('SAML2_STATUS_SUCCESS', 'urn:oasis:names:tc:SAML:2.0:status:Success'); -- GitLab