From b9384150b7edd916b8be3bb30e4ee9262f924817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Wed, 7 Dec 2022 06:55:34 +0800 Subject: [PATCH] Added documentation to the private properties of DigestAuth. --- src/flask_digest_auth/auth.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/flask_digest_auth/auth.py b/src/flask_digest_auth/auth.py index 409dbaa..a2d2922 100644 --- a/src/flask_digest_auth/auth.py +++ b/src/flask_digest_auth/auth.py @@ -43,6 +43,7 @@ class DigestAuth: """ self.__serializer: URLSafeTimedSerializer \ = URLSafeTimedSerializer(token_urlsafe(32)) + """The serializer to generate and validate the nonce and opaque.""" self.realm: str = "" if realm is None else realm """The realm. Default is an empty string.""" self.algorithm: t.Optional[t.Literal["MD5", "MD5-sess"]] = None @@ -61,8 +62,11 @@ class DigestAuth: """The current Flask application.""" self.__get_password_hash: BasePasswordHashGetter \ = BasePasswordHashGetter() + """The callback to return the password hash.""" self.__get_user: BaseUserGetter = BaseUserGetter() + """The callback to return the user.""" self.__on_login: BaseOnLogInCallback = BaseOnLogInCallback() + """The callback to run when the user logs in.""" def login_required(self, view) -> t.Callable: """The view decorator for HTTP digest authentication.