diff options
author | Clint Byrum <clint@fewbar.com> | 2015-05-27 00:11:32 -0700 |
---|---|---|
committer | Clint Byrum <clint@fewbar.com> | 2015-05-28 09:50:57 -0700 |
commit | c76eaf78fe8000efa951a3c75ede1a32beb3c9a4 (patch) | |
tree | 42e616826e50434a78c8949645255175819d1578 /src/saml2/pack.py | |
parent | ed5d61787ee45b7eb18631aa0d0eb15af75daf22 (diff) | |
download | pysaml2-c76eaf78fe8000efa951a3c75ede1a32beb3c9a4.tar.gz |
Fix more renamed modules/functions for py3
In doing so it was discovered that the 'implements' function has been
replaced by a class decorator, which must be used in python3.
Also commented out method arguments seem to expose internal py.test
problems in python3. Removing them seems fine since we can look in
revision history if we need to find the exact way it was used before.
Diffstat (limited to 'src/saml2/pack.py')
-rw-r--r-- | src/saml2/pack.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/saml2/pack.py b/src/saml2/pack.py index 43cfadc6..b2c9c45f 100644 --- a/src/saml2/pack.py +++ b/src/saml2/pack.py @@ -10,10 +10,9 @@ Bindings normally consists of three parts: - how to package the information - which protocol to use """ -from six.moves.urllib.parse import urlparse +from six.moves.urllib.parse import urlparse, urlencode import saml2 import base64 -import urllib from saml2.s_utils import deflate_and_base64_encode from saml2.s_utils import Unsupported import logging @@ -126,12 +125,12 @@ def http_redirect_message(message, location, relay_state="", typ="SAMLRequest", except: raise Unsupported("Signing algorithm") else: - string = "&".join([urllib.urlencode({k: args[k]}) + string = "&".join([urlencode({k: args[k]}) for k in _order if k in args]) args["Signature"] = base64.b64encode(signer.sign(string, key)) - string = urllib.urlencode(args) + string = urlencode(args) else: - string = urllib.urlencode(args) + string = urlencode(args) glue_char = "&" if urlparse(location).query else "?" login_url = glue_char.join([location, string]) |