Skip to content
This repository was archived by the owner on Jun 23, 2023. It is now read-only.

Commit 3a2cc98

Browse files
authored
Merge pull request #163 from nsklikas/feature-token-exists
Check if token exists
2 parents 4a50cbb + d627553 commit 3a2cc98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/oidcop/oidc/userinfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def process_request(self, request=None, **kwargs):
118118
_grant = _session_info["grant"]
119119
token = _grant.get_token(request["access_token"])
120120
# should be an access token
121-
if token.token_class != "access_token":
121+
if token and token.token_class != "access_token":
122122
return self.error_cls(error="invalid_token", error_description="Wrong type of token")
123123

124124
# And it should be valid

0 commit comments

Comments
 (0)