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 <rep...@bugs.python.org>
<http://bugs.python.org/issue21935>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to