diff options
| author | Omer Katz <omer.drow@gmail.com> | 2015-07-19 11:33:37 +0300 |
|---|---|---|
| committer | Omer Katz <omer.drow@gmail.com> | 2015-07-19 11:33:37 +0300 |
| commit | 311b57cc25a56d337be785af8f993b1ea4021fa5 (patch) | |
| tree | c3dc1936a74c87770d3b30950a9062a07fe1bc4a /docs | |
| parent | 3df94af950989b4594fde7df509723d77d0df2bf (diff) | |
| parent | db12b04e666927786ca8c6459ce1063d6c0d7ec3 (diff) | |
| download | oauthlib-311b57cc25a56d337be785af8f993b1ea4021fa5.tar.gz | |
Merge pull request #325 from djmitche/token_generator_fix
Fix documentation for token_generator signature
Diffstat (limited to 'docs')
| -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: |
