Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update .readthedocs.yaml #415

Merged
merged 3 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .readthedocs.yml → .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# .readthedocs.yml
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

Expand All @@ -13,6 +13,7 @@ build:
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
fail_on_warning: true

python:
install:
Expand Down
2 changes: 1 addition & 1 deletion docs/authentication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Authentication

Authentication classes are used to associate a request with a user. Unless otherwise noted, all of the classes below adhere to the Django `REST Framework's API for authentication classes <http://www.django-rest-framework.org/api-guide/authentication/>`_.

.. automodule:: edx_rest_framework_extensions.authentication
.. automodule:: edx_rest_framework_extensions.auth
:members:
9 changes: 9 additions & 0 deletions docs/decisions/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Architectural Decision Records
##############################

.. toctree::
:glob:
:numbered:
:maxdepth: 1

./*
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ Table of Contents
permissions
utils
changelog
decisions/index
18 changes: 12 additions & 6 deletions edx_rest_framework_extensions/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,22 @@ class RequestCustomAttributesMiddleware(MiddlewareMixin):

Possible custom attributes include:
request_authenticated_user_set_in_middleware:
Example values: 'process_request', 'process_view', 'process_response',
or 'process_exception'. Attribute won't exist if user is not authenticated.
request_auth_type_guess: Example values include: no-user, unauthenticated,
jwt, bearer, other-token-type, jwt-cookie, or session-or-other
Example values: 'process_request', 'process_view', 'process_response', or 'process_exception'.

Attribute won't exist if user is not authenticated.

request_auth_type_guess:
Example values include: no-user, unauthenticated, jwt, bearer, other-token-type, jwt-cookie, or
session-or-other

Note: These are just guesses because if a token was expired, for example,
the user could have been authenticated by some other means.
the user could have been authenticated by some other means.

request_client_name: The client name from edx-rest-api-client calls.
request_referer
request_referer: The referrer for the request.
request_user_agent: The user agent string from the request header.
request_user_id: The user id of the request user.

request_is_staff_or_superuser: `staff` or `superuser` depending on whether the
user in the request is a django staff or superuser.

Expand Down