added httprequest fixes
This commit is contained in:
parent
6b5bc0d3ad
commit
3b7ebe9f00
|
@ -292,14 +292,13 @@ class Redirect(OAuthView, Mixin):
|
|||
an error.
|
||||
"""
|
||||
|
||||
def error_response(self, error, mimetype='application/json', status=400,
|
||||
def error_response(self, error, mimetype='deprecated', status=400,
|
||||
**kwargs):
|
||||
"""
|
||||
Return an error response to the client with default status code of
|
||||
*400* stating the error as outlined in :rfc:`5.2`.
|
||||
"""
|
||||
return HttpResponse(json.dumps(error), mimetype=mimetype,
|
||||
status=status, **kwargs)
|
||||
return HttpResponse(json.dumps(error), status=status, **kwargs)
|
||||
|
||||
def get(self, request):
|
||||
data = self.get_data(request)
|
||||
|
@ -457,14 +456,13 @@ class AccessToken(OAuthView, Mixin):
|
|||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def error_response(self, error, mimetype='application/json', status=400,
|
||||
def error_response(self, error, mimetype='deprecated', status=400,
|
||||
**kwargs):
|
||||
"""
|
||||
Return an error response to the client with default status code of
|
||||
*400* stating the error as outlined in :rfc:`5.2`.
|
||||
"""
|
||||
return HttpResponse(json.dumps(error), mimetype=mimetype,
|
||||
status=status, **kwargs)
|
||||
return HttpResponse(json.dumps(error), status=status, **kwargs)
|
||||
|
||||
def access_token_response(self, access_token):
|
||||
"""
|
||||
|
@ -487,9 +485,7 @@ class AccessToken(OAuthView, Mixin):
|
|||
except ObjectDoesNotExist:
|
||||
pass
|
||||
|
||||
return HttpResponse(
|
||||
json.dumps(response_data), mimetype='application/json'
|
||||
)
|
||||
return HttpResponse(json.dumps(response_data))
|
||||
|
||||
def authorization_code(self, request, data, client):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue