diff --git a/requirements.txt b/requirements.txt index 4a6967e..37e8500 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,4 +7,4 @@ requests openstacksdk python-dateutil rehash -pyjwt +pyjwt>=2.0.0,<3.0.0 diff --git a/zuul_registry/main.py b/zuul_registry/main.py index 9d29704..9f97fb2 100644 --- a/zuul_registry/main.py +++ b/zuul_registry/main.py @@ -128,8 +128,7 @@ class Authorization(cherrypy.Tool): else: self.unauthorized() self.log.debug('Generate %s token', level) - token = jwt.encode({'level': level}, 'secret', - algorithm='HS256').decode('utf8') + token = jwt.encode({'level': level}, 'secret', algorithm='HS256') return {'token': token, 'access_token': token}