Skip to content

Commit

Permalink
Merge pull request #1503 from resmio/remove-request-dot-request
Browse files Browse the repository at this point in the history
Replacing deprecated request.REQUEST, closes #1502
  • Loading branch information
SeanHayes committed Mar 9, 2017
2 parents 29eae91 + e18b454 commit 72ff598
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tastypie/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,9 @@ def is_valid_request(self, request):
according to OAuth spec) or fall back to ``GET/POST``.
"""
auth_params = request.META.get("HTTP_AUTHORIZATION", [])
return self.is_in(auth_params) or self.is_in(request.REQUEST)
return (self.is_in(auth_params) or
self.is_in(request.POST) or
self.is_in(request.GET))

def validate_token(self, request, consumer, token):
oauth_server, oauth_request = oauth_provider.utils.initialize_server_request(request)
Expand Down

0 comments on commit 72ff598

Please sign in to comment.