From 1065c0b359a0949c33d2845b3e090093b824e32f Mon Sep 17 00:00:00 2001 From: Unrud Date: Sun, 17 Sep 2017 14:03:46 +0200 Subject: [PATCH] Move documentation to correct method --- radicale/auth.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/radicale/auth.py b/radicale/auth.py index b524106..ec96833 100644 --- a/radicale/auth.py +++ b/radicale/auth.py @@ -99,11 +99,7 @@ class BaseAuth: return () def is_authenticated(self, user, password): - """Validate credentials. - - Iterate through htpasswd credential file until user matches, extract - hash (encrypted password) and check hash against user-given password, - using the method specified in the Radicale config. + """Validate credentials.""" """ raise NotImplementedError @@ -209,9 +205,17 @@ class Auth(BaseAuth): return md5_apr1.verify(password, hash_value) def is_authenticated(self, user, password): - # The content of the file is not cached because reading is generally a - # very cheap operation, and it's useful to get live updates of the - # htpasswd file. + """Validate credentials. + + Iterate through htpasswd credential file until user matches, extract + hash (encrypted password) and check hash against user-given password, + using the method specified in the Radicale config. + + The content of the file is not cached because reading is generally a + very cheap operation, and it's useful to get live updates of the + htpasswd file. + + """ try: with open(self.filename) as f: for line in f: