summaryrefslogtreecommitdiff
path: root/src/saml2
diff options
context:
space:
mode:
Diffstat (limited to 'src/saml2')
-rw-r--r--src/saml2/ecp.py4
-rw-r--r--src/saml2/s2repoze/plugins/sp.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/saml2/ecp.py b/src/saml2/ecp.py
index 5817cda4..56448e9c 100644
--- a/src/saml2/ecp.py
+++ b/src/saml2/ecp.py
@@ -6,7 +6,7 @@
Contains classes used in the SAML ECP profile
"""
import logging
-from saml2.client_base import ACTOR
+from saml2.client_base import ACTOR, MIME_PAOS
from saml2.ecp_client import SERVICE
from saml2 import element_to_extension_element
@@ -30,7 +30,7 @@ logger = logging.getLogger(__name__)
def ecp_capable(headers):
- if "application/vnd.paos+xml" in headers["Accept"]:
+ if MIME_PAOS in headers["Accept"]:
if "PAOS" in headers:
if 'ver="%s";"%s"' % (paos.NAMESPACE,
SERVICE) in headers["PAOS"]:
diff --git a/src/saml2/s2repoze/plugins/sp.py b/src/saml2/s2repoze/plugins/sp.py
index 897f31f1..14d19c05 100644
--- a/src/saml2/s2repoze/plugins/sp.py
+++ b/src/saml2/s2repoze/plugins/sp.py
@@ -27,7 +27,7 @@ from paste.request import parse_dict_querystring
from paste.request import construct_url
from saml2.extension.pefim import SPCertEnc
from saml2.httputil import getpath, SeeOther
-from saml2.client_base import ECP_SERVICE
+from saml2.client_base import ECP_SERVICE, MIME_PAOS
from zope.interface import implementer
from repoze.who.interfaces import IChallenger, IIdentifier, IAuthenticator
@@ -179,7 +179,7 @@ class SAML2Plugin(object):
logger.info("[_pick_idp] %s", environ)
if "HTTP_PAOS" in environ:
if environ["HTTP_PAOS"] == PAOS_HEADER_INFO:
- if 'application/vnd.paos+xml' in environ["HTTP_ACCEPT"]:
+ if MIME_PAOS in environ["HTTP_ACCEPT"]:
# Where should I redirect the user to
# entityid -> the IdP to use
# relay_state -> when back from authentication