Skip to content

Commit 2f4f2d6

Browse files
committed
addition in samlp rejected by upstream, hence class moved to httputil
1 parent 361f862 commit 2f4f2d6

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

src/saml2/httputil.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,20 @@ class BadGateway(Response):
142142
_status = "502 Bad Gateway"
143143

144144

145+
class HttpParameters():
146+
"""GET or POST signature parameters for Redirect or POST-SimpleSign bindings
147+
because they are not contained in XML unlike the POST binding
148+
"""
149+
signature = None
150+
sigalg = None
151+
# Relaystate and SAML message are stored elsewhere
152+
def __init__(self, dict):
153+
try:
154+
self.signature = dict["Signature"][0]
155+
self.sigalg = dict["SigAlg"][0]
156+
except KeyError:
157+
pass
158+
145159
def extract(environ, empty=False, err=False):
146160
"""Extracts strings in form data and returns a dict.
147161

src/saml2/samlp.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,18 +1317,6 @@ def authn_request_from_string(xml_string):
13171317
return saml2.create_class_from_xml_string(AuthnRequest, xml_string)
13181318

13191319

1320-
class HttpParameters():
1321-
"""GET or POST parameters for Redirecto or POST-SimpleSign bindings"""
1322-
signature = None
1323-
sigalg = None
1324-
# Relaystate and SAML message are stored elsewhere
1325-
def __init__(self, dict):
1326-
try:
1327-
self.signature = dict["Signature"][0]
1328-
self.sigalg = dict["SigAlg"][0]
1329-
except KeyError:
1330-
pass
1331-
13321320
class StatusType_(SamlBase):
13331321
"""The urn:oasis:names:tc:SAML:2.0:protocol:StatusType element """
13341322

0 commit comments

Comments
 (0)