diff options
author | Dustin J. Mitchell <dustin@mozilla.com> | 2015-02-27 15:18:51 -0500 |
---|---|---|
committer | Dustin J. Mitchell <dustin@mozilla.com> | 2015-02-27 15:18:51 -0500 |
commit | db12b04e666927786ca8c6459ce1063d6c0d7ec3 (patch) | |
tree | 6a6fa2e2353f43ad5c014dd30eb016ccf1147e6d /docs/oauth2 | |
parent | fd239fca84644896b1971cf24bc6213d065adb86 (diff) | |
download | oauthlib-db12b04e666927786ca8c6459ce1063d6c0d7ec3.tar.gz |
Fix documentation for token_generator signature
Diffstat (limited to 'docs/oauth2')
-rw-r--r-- | docs/oauth2/preconfigured_servers.rst | 4 |
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: |