Skip to content

Commit 15c8afd

Browse files
committed
Make it work with 3.5
1 parent 316565d commit 15c8afd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ sudo: false
44

55
python:
66
- "3.6"
7+
- "3.5"
78

89
install:
910
- pip install tox

src/cryptojwt/jwx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from .jwk.rsa import load_x509_cert
1212
from .jwk.rsa import RSAKey
1313
from .exception import HeaderError
14-
from .utils import b64d, as_bytes
14+
from .utils import b64d, as_bytes, as_unicode
1515

1616
logger = logging.getLogger(__name__)
1717

@@ -247,7 +247,7 @@ def _decode(self, payload):
247247
_msg = b64d(as_bytes(payload))
248248
if "cty" in self:
249249
if self["cty"] == "JWT":
250-
_msg = json.loads(_msg)
250+
_msg = json.loads(as_unicode(_msg))
251251
return _msg
252252

253253
def dump_header(self):

0 commit comments

Comments
 (0)