File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,11 @@ class IntrospectTokenView(ClientProtectedScopedResourceView):
26
26
27
27
@staticmethod
28
28
def get_token_response (token_value = None ):
29
+ if token_value is None :
30
+ return JsonResponse (
31
+ {"error" : "invalid_request" , "error_description" : "Token parameter is missing." },
32
+ status = 400 ,
33
+ )
29
34
try :
30
35
token_checksum = hashlib .sha256 (token_value .encode ("utf-8" )).hexdigest ()
31
36
token = (
@@ -35,11 +40,6 @@ def get_token_response(token_value=None):
35
40
)
36
41
except ObjectDoesNotExist :
37
42
return JsonResponse ({"active" : False }, status = 200 )
38
- except AttributeError :
39
- return JsonResponse (
40
- {"error" : "invalid_request" , "error_description" : "Token parameter is missing." },
41
- status = 400 ,
42
- )
43
43
else :
44
44
if token .is_valid ():
45
45
data = {
You can’t perform that action at this time.
0 commit comments