aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/request.py
diff options
context:
space:
mode:
authorTom Christie2012-12-21 01:03:01 -0800
committerTom Christie2012-12-21 01:03:01 -0800
commit166292f682b82f5ca3b91c0b545456b8107b4103 (patch)
tree73f51fabe93754af5e4bee6adc19fdbec9af4bfb /rest_framework/request.py
parentc27295dcbdf89b3cbc10d6325833e428c66c0f2a (diff)
parent125f027d2d124e2a483406d9d70e447b8634350c (diff)
downloaddjango-rest-framework-166292f682b82f5ca3b91c0b545456b8107b4103.tar.bz2
Merge pull request #528 from mhsparks/master
Added setter to auth property
Diffstat (limited to 'rest_framework/request.py')
-rw-r--r--rest_framework/request.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/rest_framework/request.py b/rest_framework/request.py
index 39c64321..b7133608 100644
--- a/rest_framework/request.py
+++ b/rest_framework/request.py
@@ -188,6 +188,14 @@ class Request(object):
self._user, self._auth = self._authenticate()
return self._auth
+ @auth.setter
+ def auth(self, value):
+ """
+ Sets any non-user authentication information associated with the
+ request, such as an authentication token.
+ """
+ self._auth = value
+
def _load_data_and_files(self):
"""
Parses the request content into self.DATA and self.FILES.