Skip to content

Commit d2cde74

Browse files
committed
fixed settings doc
1 parent 4382cb2 commit d2cde74

File tree

4 files changed

+57
-162
lines changed

4 files changed

+57
-162
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
# Add any Sphinx extension module names here, as strings. They can be extensions
3333
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
34-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'rfc', 'settings_generator']
34+
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'rfc',]
3535

3636
# Add any paths that contain templates here, relative to this directory.
3737
templates_path = ['_templates']

docs/rest-framework/permissions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ For example:
4646
permission_classes = [TokenHasReadWriteScope]
4747
required_scopes = ['music']
4848
49-
When a request is performed both the `READ_SCOPE`\`WRITE_SCOPE` and 'music' scopes are required to be authorized for the current access token.
49+
When a request is performed both the `READ_SCOPE` \\ `WRITE_SCOPE` and 'music' scopes are required to be authorized for the current access token.
5050

docs/settings.rst

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,58 @@ A big *thank you* to the guys from Django REST Framework for inspiring this.
2626
List of available settings
2727
--------------------------
2828

29-
.. settings_generator::
30-
:type: definitions
29+
ACCESS_TOKEN_EXPIRE_SECONDS
30+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
31+
The number of seconds an access token remains valid. Requesting a protected
32+
resource after this duration will fail. Keep this value high enough so clients
33+
can cache the token for a reasonable amount of time.
34+
35+
APPLICATION_MODEL
36+
~~~~~~~~~~~~~~~~~
37+
The import string of the class (model) representing your applications. Overwrite
38+
this value if you wrote your own implementation (subclass of
39+
``oauth2_provider.models.Application``).
40+
41+
AUTHORIZATION_CODE_EXPIRE_SECONDS
42+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
43+
The number of seconds an authorization code remains valid. Requesting an access
44+
token after this duration will fail. :rfc:`4.1.2` recommends a
45+
10 minutes (600 seconds) duration.
46+
47+
CLIENT_ID_GENERATOR_CLASS
48+
~~~~~~~~~~~~~~~~~~~~~~~~~
49+
The import string of the class responsible for generating client identifiers.
50+
These are usually random strings.
51+
52+
CLIENT_SECRET_GENERATOR_CLASS
53+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
54+
The import string of the class responsible for generating client secrets.
55+
These are usually random strings.
56+
57+
CLIENT_SECRET_GENERATOR_LENGTH
58+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
59+
The length of the generated secrets, in characters. If this value is too low,
60+
secrets may become subject to bruteforce guessing.
61+
62+
OAUTH2_VALIDATOR_CLASS
63+
~~~~~~~~~~~~~~~~~~~~~~
64+
The import string of the ``oauthlib.oauth2.RequestValidator`` subclass that
65+
validates every step of the OAuth2 process.
66+
67+
SCOPES
68+
~~~~~~
69+
A dictionnary mapping each scope name to its human description.
70+
71+
READ_SCOPE
72+
~~~~~~~~~~
73+
The name of the *read* scope.
74+
75+
WRITE_SCOPE
76+
~~~~~~~~~~~
77+
The name of the *write* scope.
78+
79+
REQUEST_APPROVAL_PROMPT
80+
~~~~~~~~~~~~~~~~~~~~~~~
81+
Can be ``'force'`` or ``'auto'``.
82+
The strategy used to display the authorization form. Refer to :ref:`skip-auth-form`.
83+

docs/settings_generator.py

Lines changed: 0 additions & 158 deletions
This file was deleted.

0 commit comments

Comments
 (0)