From c6ed8be3e5cde6d2192c90cfc1e88f23fe926153 Mon Sep 17 00:00:00 2001 From: Hanne Moa Date: Mon, 6 Nov 2023 08:13:26 +0100 Subject: [PATCH] Improve/add module docstrings --- python/nav/web/auth/__init__.py | 2 -- python/nav/web/auth/middleware.py | 3 +++ python/nav/web/auth/remote_user.py | 4 +++- python/nav/web/auth/sudo.py | 4 +--- python/nav/web/auth/utils.py | 5 ++++- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/python/nav/web/auth/__init__.py b/python/nav/web/auth/__init__.py index c082668a04..142a0d4e5f 100644 --- a/python/nav/web/auth/__init__.py +++ b/python/nav/web/auth/__init__.py @@ -15,8 +15,6 @@ # """ Contains web authentication and login functionality for NAV. - -The "*Middleware" is Django-specific. """ from datetime import datetime diff --git a/python/nav/web/auth/middleware.py b/python/nav/web/auth/middleware.py index 12ba354775..5d2b55daff 100644 --- a/python/nav/web/auth/middleware.py +++ b/python/nav/web/auth/middleware.py @@ -13,6 +13,9 @@ # more details. You should have received a copy of the GNU General Public # License along with NAV. If not, see . # +""" +Django middleware for handling login, authentication and authorization for NAV. +""" import logging import os diff --git a/python/nav/web/auth/remote_user.py b/python/nav/web/auth/remote_user.py index f790c4f3c0..5b6dac3100 100644 --- a/python/nav/web/auth/remote_user.py +++ b/python/nav/web/auth/remote_user.py @@ -13,7 +13,9 @@ # more details. You should have received a copy of the GNU General Public # License along with NAV. If not, see . # - +""" +Support logging in by having the web server set the REMOTE_USER header. +""" import logging from os.path import join diff --git a/python/nav/web/auth/sudo.py b/python/nav/web/auth/sudo.py index fd182dfd9c..85c8fca61f 100644 --- a/python/nav/web/auth/sudo.py +++ b/python/nav/web/auth/sudo.py @@ -14,9 +14,7 @@ # License along with NAV. If not, see . # """ -Contains web authentication and login functionality for NAV. - -The "*Middleware" is Django-specific. +Sudo functionality for web authentication in NAV. """ import logging diff --git a/python/nav/web/auth/utils.py b/python/nav/web/auth/utils.py index 3bfbf0ef8b..874623c2e3 100644 --- a/python/nav/web/auth/utils.py +++ b/python/nav/web/auth/utils.py @@ -13,7 +13,10 @@ # more details. You should have received a copy of the GNU General Public # License along with NAV. If not, see . # - +""" +Utilities for authentication/authorization in NAV that is independent of +login method. +""" import logging from django.conf import settings