Merge pull request #161 from geops/master
make urn:oasis:names:tc:SAML:2.0:status:Responder known in response.py
This commit is contained in:
@@ -496,7 +496,9 @@ class SAML2Plugin(object):
|
|||||||
# find it
|
# find it
|
||||||
environ["post.fieldstorage"] = post
|
environ["post.fieldstorage"] = post
|
||||||
# restore wsgi.input incase that is needed
|
# restore wsgi.input incase that is needed
|
||||||
environ['wsgi.input'] = StringIO(environ['s2repoze.body'])
|
# only of s2repoze.body is present
|
||||||
|
if 's2repoze.body' in environ:
|
||||||
|
environ['wsgi.input'] = StringIO(environ['s2repoze.body'])
|
||||||
return {}
|
return {}
|
||||||
else:
|
else:
|
||||||
logger.info("[sp.identify] --- SAMLResponse ---")
|
logger.info("[sp.identify] --- SAMLResponse ---")
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ from saml2.samlp import STATUS_TOO_MANY_RESPONSES
|
|||||||
from saml2.samlp import STATUS_UNKNOWN_ATTR_PROFILE
|
from saml2.samlp import STATUS_UNKNOWN_ATTR_PROFILE
|
||||||
from saml2.samlp import STATUS_UNKNOWN_PRINCIPAL
|
from saml2.samlp import STATUS_UNKNOWN_PRINCIPAL
|
||||||
from saml2.samlp import STATUS_UNSUPPORTED_BINDING
|
from saml2.samlp import STATUS_UNSUPPORTED_BINDING
|
||||||
|
from saml2.samlp import STATUS_RESPONDER
|
||||||
|
|
||||||
import xmldsig as ds
|
import xmldsig as ds
|
||||||
import xmlenc as xenc
|
import xmlenc as xenc
|
||||||
@@ -158,6 +159,8 @@ class StatusUnknownPrincipal(StatusError):
|
|||||||
class StatusUnsupportedBinding(StatusError):
|
class StatusUnsupportedBinding(StatusError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
class StatusResponder(StatusError):
|
||||||
|
pass
|
||||||
|
|
||||||
STATUSCODE2EXCEPTION = {
|
STATUSCODE2EXCEPTION = {
|
||||||
STATUS_VERSION_MISMATCH: StatusVersionMismatch,
|
STATUS_VERSION_MISMATCH: StatusVersionMismatch,
|
||||||
@@ -180,6 +183,7 @@ STATUSCODE2EXCEPTION = {
|
|||||||
STATUS_UNKNOWN_ATTR_PROFILE: StatusUnknownAttrProfile,
|
STATUS_UNKNOWN_ATTR_PROFILE: StatusUnknownAttrProfile,
|
||||||
STATUS_UNKNOWN_PRINCIPAL: StatusUnknownPrincipal,
|
STATUS_UNKNOWN_PRINCIPAL: StatusUnknownPrincipal,
|
||||||
STATUS_UNSUPPORTED_BINDING: StatusUnsupportedBinding,
|
STATUS_UNSUPPORTED_BINDING: StatusUnsupportedBinding,
|
||||||
|
STATUS_RESPONDER: StatusResponder,
|
||||||
}
|
}
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user