2008/8/20 PeteDK <[EMAIL PROTECTED]>:
> I want to retreive the name of the currently logged in user on the OS
> on which my django app lives.
> Is this possible?

You should realize that there is no direct connection between the user
logged in the webserver and the user connecting via HTTP to your
Django app. There is nothing preventing a user to connect to your
Django app without logging to the server first ...

> The thing is. The app is to be used in a private environment, so all
> the users have to log on to the webserver first(this cant be changed).
> I would be nice to avoid having them to log into the django app
> afterwards.

So what you seem to be looking for is a Single Sign On (SSO) solution.
I dont know of any standard way to do that under Linux, but if you are
using Windows, there is a standard mechanism for that. I think it is
based on Kerberos and integrates with Active Directory. I'm far from a
Windows expert, so dont ask me for the details, but I have been using
this solution :

* use IIS as a front proxy, IIS will do the authentication
* IIS will forward the request to the backend server (in your case
Django, running on Apache or even running on IIS)
* the request is forwarded with additional HTTP headers describing the
authentication (including the username)
* you can then write a specialized authentication middleware that will
use those headers to associate the session with the user

> So after they are logged into the webserver it would be fair to assume
> they are authorised users and if i could just locate their OS username
> somehow then i could use this username to login the current user, in
> the background with a standard password.
>
> I hope you get my meaning:)
>
> i have looked into the python standard library, and a module named
> getpass() however i cant get i to work:-(
>
> i hope someone has a clever idea to solve this problem.
>
> Thanks! :)
>
> /Pete
>
> PS: and the webserver runs linux. :-)
> >
>



-- 
Jabber : [EMAIL PROTECTED]
Skype : Guillaume.Lederrey
Projects :
* http://rwanda.ledcom.ch/
* http://trock.ch/
Others :
* http://kiva.org/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to