从Django获取客户端Active Directory用户名 [英] Get Client Active Directory UserName from Django

查看:213
本文介绍了从Django获取客户端Active Directory用户名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须设计一个Intranet应用程序。我们使用Windows Active Directory控制用户的访问。
用户可以发布一些数据,然后应用程序必须在数据库中保留用户发布数据和Windows AD用户名。

I have to design an intranet app. We control users access by using Windows Active Directory. The user can post some data then the app must persist user post data and Windows AD username in the database.

是否可以获取AD用户名(

Is there a way to get AD username (client not server) from Django?

感谢您考虑我的问题。

推荐答案

似乎只有在客户端浏览器是使用集成Windows身份验证的Internet Explorer时,您才能执行此操作。 http://www.iis.net/configreference/system.webserver/security/authentication/windowsauthentication (在IE中将其打开,以 https://stackoverflow.com/a/680838/3033586 )...在Django文档中,我仅发现了对此问题的一种引用 https://docs.djangoproject.com/en/dev/howto/auth-remote-user/

Seems you can do it only if client browser is Internet Explorer using "Integrated Windows Authentication" http://www.iis.net/configreference/system.webserver/security/authentication/windowsauthentication (turn on it in IE, credits to https://stackoverflow.com/a/680838/3033586) ... in Django docs I've found only one reference to this problem https://docs.djangoproject.com/en/dev/howto/auth-remote-user/

这篇关于从Django获取客户端Active Directory用户名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆