From b6d7847eaefdd8719d9844646a32fdbb18399569 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 28 Sep 2020 09:04:31 +0200 Subject: [PATCH] providers/oauth2: fix token introspection view --- passbook/providers/oauth2/views/introspection.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/passbook/providers/oauth2/views/introspection.py b/passbook/providers/oauth2/views/introspection.py index 5c87d075d..b72964159 100644 --- a/passbook/providers/oauth2/views/introspection.py +++ b/passbook/providers/oauth2/views/introspection.py @@ -34,7 +34,7 @@ class TokenIntrospectionParams: except RefreshToken.DoesNotExist: LOGGER.debug("Token does not exist", token=raw_token) raise TokenIntrospectionError() - if self.token.has_expired(): + if self.token.is_expired: LOGGER.debug("Token is not valid", token=raw_token) raise TokenIntrospectionError() try: @@ -97,9 +97,9 @@ class TokenIntrospectionView(View): def post(self, request: HttpRequest) -> HttpResponse: """Introspection handler""" - self.params = TokenIntrospectionParams.from_request(request) - try: + self.params = TokenIntrospectionParams.from_request(request) + response_dic = {} if self.id_token: token_dict = self.id_token.to_dict()