summaryrefslogtreecommitdiff
path: root/fbin/api.py
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2021-08-15 12:43:41 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2021-08-15 12:43:41 +0200
commit3f9e930748af4714a4e1ff58fc5aa8b382fa1515 (patch)
tree77e0594a6527f3fd7653d7429322ddc9807d41b7 /fbin/api.py
parente96bedf7477d392b8821f76ca85038c198c84375 (diff)
Add algorithms to jwt.decode calls
Diffstat (limited to 'fbin/api.py')
-rw-r--r--fbin/api.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/fbin/api.py b/fbin/api.py
index 5659b3a..dc7e1f8 100644
--- a/fbin/api.py
+++ b/fbin/api.py
@@ -31,7 +31,8 @@ def authenticate():
if scheme != 'Bearer':
abort(400)
try:
- token = jwt.decode(token, current_app.config['SECRET_KEY'], issuer=request.url_root)
+ token = jwt.decode(token, current_app.config['SECRET_KEY'], issuer=request.url_root,
+ algorithms=[current_app.config['API_JWT_ALGORITHM']])
except jwt.InvalidTokenError:
abort(403)
try: