summaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorEgor Panfilov <edpanfilov@sbcloud.ru>2018-11-19 18:15:14 +0300
committerEgor Panfilov <edpanfilov@sbcloud.ru>2018-11-19 18:24:06 +0300
commitf15ad580d7f8d6cd933963ea69f3fb3896cfa254 (patch)
treef57f99af4e7b17aa9a73387e023a66f14f8cb661 /example
parentc07b12e208d6246b2d6219635884c184f1c11649 (diff)
downloadpysaml2-f15ad580d7f8d6cd933963ea69f3fb3896cfa254.tar.gz
Replace string literals with MIME_PAOS
Diffstat (limited to 'example')
-rwxr-xr-xexample/sp-wsgi/sp.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/example/sp-wsgi/sp.py b/example/sp-wsgi/sp.py
index 9de43abe..90d7838c 100755
--- a/example/sp-wsgi/sp.py
+++ b/example/sp-wsgi/sp.py
@@ -9,6 +9,8 @@ import os
import re
import sys
import xml.dom.minidom
+
+from saml2.client_base import MIME_PAOS
from saml2.sigver import SignatureError
import six
@@ -470,7 +472,7 @@ class SSO(object):
logger.debug("[_pick_idp] %s", self.environ)
if "HTTP_PAOS" in self.environ:
if self.environ["HTTP_PAOS"] == PAOS_HEADER_INFO:
- if 'application/vnd.paos+xml' in self.environ["HTTP_ACCEPT"]:
+ if MIME_PAOS in self.environ["HTTP_ACCEPT"]:
# Where should I redirect the user to
# entityid -> the IdP to use
# relay_state -> when back from authentication