X-Git-Url: https://projects.mako.cc/source/twitter-api-cdsw/blobdiff_plain/b5d973d7a0a14eca21b2981ffacf4fb9ea77ba41..29c8e0142111e03237eb8f92a9470ba90d295e10:/oauthlib/oauth2/rfc6749/endpoints/revocation.py diff --git a/oauthlib/oauth2/rfc6749/endpoints/revocation.py b/oauthlib/oauth2/rfc6749/endpoints/revocation.py index b73131c..662c793 100644 --- a/oauthlib/oauth2/rfc6749/endpoints/revocation.py +++ b/oauthlib/oauth2/rfc6749/endpoints/revocation.py @@ -74,7 +74,7 @@ class RevocationEndpoint(BaseEndpoint): self.request_validator.revoke_token(request.token, request.token_type_hint, request) - response_body = None + response_body = '' if self.enable_jsonp and request.callback: response_body = request.callback + '();' return {}, response_body, 200 @@ -120,8 +120,9 @@ class RevocationEndpoint(BaseEndpoint): raise InvalidRequestError(request=request, description='Missing token parameter.') - if not self.request_validator.authenticate_client(request): - raise InvalidClientError(request=request) + if self.request_validator.client_authentication_required(request): + if not self.request_validator.authenticate_client(request): + raise InvalidClientError(request=request) if (request.token_type_hint and request.token_type_hint in self.valid_token_types and