- Notifications
You must be signed in to change notification settings - Fork 824
Closed
Description
RFC 7662 specifies that :
If the introspection call is properly authorized but the token is not
active, does not exist on this server, or the protected resource is
not allowed to introspect this particular token, then the
authorization server MUST return an introspection response with the
"active" field set to "false".
However, in introspect.py:
@staticmethoddefget_token_response(token_value=None): try: token=get_access_token_model().objects.get(token=token_value) exceptObjectDoesNotExist: returnHttpResponse( content=json.dumps({"active": False}), status=401, content_type="application/json" ) else: iftoken.is_valid(): [ ... ] else: returnHttpResponse(content=json.dumps({"active": False, }), status=200, content_type="application/json")Is there a reason not to send the same response when the token does not exists or is invalid ?
IvanAnishchuk
Metadata
Metadata
Assignees
Labels
No labels