X-Git-Url: https://projects.mako.cc/source/twitter-api-cdsw/blobdiff_plain/043b63c67557591f1e85b53d17fc8a1a797f48ca..29c8e0142111e03237eb8f92a9470ba90d295e10:/oauthlib/oauth2/rfc6749/endpoints/revocation.py?ds=inline 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