Skip to content
This repository was archived by the owner on Jun 23, 2023. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/oidcop/token/handler.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
import os
from typing import Optional
import warnings
from typing import Optional

from cryptojwt.exception import Invalid
from cryptojwt.key_jar import init_key_jar
Expand All @@ -13,6 +13,7 @@
from oidcop.token import DefaultToken
from oidcop.token import Token
from oidcop.token import UnknownToken
from oidcop.token import WrongTokenClass
from oidcop.token import WrongTokenType
from oidcop.util import importer

Expand Down Expand Up @@ -73,7 +74,15 @@ def get_handler(self, token, order=None):
for typ in order:
try:
res = self.handler[typ].info(token)
except (KeyError, WrongTokenType, InvalidToken, UnknownToken, Invalid, AttributeError):
except (
KeyError,
WrongTokenType,
InvalidToken,
UnknownToken,
Invalid,
AttributeError,
WrongTokenClass,
):
pass
else:
return self.handler[typ], res
Expand Down