summaryrefslogtreecommitdiff
path: root/docs/oauth2
diff options
context:
space:
mode:
authorDustin J. Mitchell <dustin@mozilla.com>2015-02-27 15:18:51 -0500
committerDustin J. Mitchell <dustin@mozilla.com>2015-02-27 15:18:51 -0500
commitdb12b04e666927786ca8c6459ce1063d6c0d7ec3 (patch)
tree6a6fa2e2353f43ad5c014dd30eb016ccf1147e6d /docs/oauth2
parentfd239fca84644896b1971cf24bc6213d065adb86 (diff)
downloadoauthlib-db12b04e666927786ca8c6459ce1063d6c0d7ec3.tar.gz
Fix documentation for token_generator signature
Diffstat (limited to 'docs/oauth2')
-rw-r--r--docs/oauth2/preconfigured_servers.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/oauth2/preconfigured_servers.rst b/docs/oauth2/preconfigured_servers.rst
index 116f8d4..6184c27 100644
--- a/docs/oauth2/preconfigured_servers.rst
+++ b/docs/oauth2/preconfigured_servers.rst
@@ -14,11 +14,13 @@ Construction is simple, only import your validator and you are good to go::
If you prefer to construct tokens yourself you may pass a token generator::
- def your_token_generator(request):
+ def your_token_generator(request, refresh_token=False):
return 'a_custom_token' + request.client_id
server = WebApplicationServer(your_validator, token_generator=your_token_generator)
+This function is passed the request object and a boolean indicating whether to generate an access token (False) or a refresh token (True).
+
.. autoclass:: oauthlib.oauth2.WebApplicationServer
:members: