User Authentication

Tim Golden mail at timgolden.me.uk
Thu Jun 23 12:07:56 EDT 2011


On 23/06/2011 16:07, Anurag wrote:
> My application is a web based application for both windows and Linux.
> The web part is developed using Django. So if Python does not support
> it then any support for local sytem account authentication in Django?
>
> I am looking for a common library for both Linux and Windows. Any help
> will be Gr8

The two systems are sufficiently different in this kind of area
that any "common library" will basically consist of code like
this (hand-wavey):

<code>

import sys

if sys.platform.startswith ("win"):
   import win32security
   def is_valid_user (username, password):
     if win32security.LogonUser ( ... )

elif sys.platform.startswith ("linux"):
   import pam
   def is_valid_user (username, password):
     if pam.validate_user (...)

</code>

It's possible someone's put something together already,
but I'm not aware of anything.

TJG



More information about the Python-list mailing list