authorization: correctly handle the transition from a deprecated signature algorithm

SIgned-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2021-06-04 14:48:21 -04:00
parent 108d0578a2
commit 936d766cae
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ class Authorization:
try:
priv_key = self._load_private_key(user_info['jwt_secret'])
jwk_id = user_info['jwk_id']
except self.server.error:
except (self.server.error, KeyError):
logging.info("Invalid key found for user, removing")
user_info.pop('jwt_secret', None)
user_info.pop('jwk_id', None)