[issue21935] Implement AUTH command in smtpd.

Milan Oberkirch report at bugs.python.org
Tue Jul 15 21:47:43 CEST 2014


Milan Oberkirch added the comment:

There is no real API in the current patch and authenticating has no effect (other then preventing you from authenticating again and storing the username). I am wondering how the user should turn AUTH on/off.

Solution 1:
add a keyword argument 'enable_AUTH' and require the programmer to override _verify_user_credentials. This function could
1.1 raise NotImplementedError
1.2 deny access
by default.

Solution 2:
add a keyword argument 'authentication_function' which turns AUTH support on when given and provides the function used to verify user credentials.

Solution 3:
enable AUTH if self has the _verify_user_credentials-function as attribute (and leave it undefined in the base class)

I think solution 1 is the most explicit so I'll implement that so we have something to discuss :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21935>
_______________________________________


More information about the Python-bugs-list mailing list