summaryrefslogtreecommitdiff
path: root/jwt/algorithms.py
diff options
context:
space:
mode:
Diffstat (limited to 'jwt/algorithms.py')
-rw-r--r--jwt/algorithms.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/jwt/algorithms.py b/jwt/algorithms.py
index 83d7d12..4ed0c21 100644
--- a/jwt/algorithms.py
+++ b/jwt/algorithms.py
@@ -69,10 +69,13 @@ class NoneAlgorithm(Algorithm):
operations are required.
"""
def prepare_key(self, key):
+ if key == '':
+ key = None
+
if key is not None:
raise InvalidKeyError('When alg = "none", key value must be None.')
- return None
+ return key
def sign(self, msg, key):
return b''