doucaishou0074 2013-04-04 12:56
浏览 68

使用本地Windows用户名和密码进行身份验证的Intranet Web应用程序,使用PHP和LDAP进行身份验证

We are trying to modify our intranet web applications, Every individual user to be use their own & only one username and password log-in authentication to log-in to all intranet web applications.

For that we try to use their local windows /linux system username and password .

Once user logged in to their system he/she can able to access all intranet web application directly once he/she browse the web application. He/she no need to log-in each and every time for each and every intranet web application .

I read many articles (one ,two ,three,four and so ..) but I could not understand how am I get local windows/linux system username and password those who logged in to that system by using PHP ,at least username alone is more enough.

I tried <?php echo getenv("username"); ?> this but its shows blank.

Please give me a solution .Please don't reject this question .

Thanks in advance for your answers and comments.

  • 写回答

2条回答 默认 最新

  • dtpk04526211 2013-04-04 13:04
    关注

    You must authenticate with LDAP in your PHP.

    Steps:

    1) Make a login form 2) Receive the input and compare with your database (through ldap). 3) If its OK, start a session with PHP, save a Cookie. 4) use session_start() in all your sites, so you can get the session info.

    Cookies can only be used by sites that created it, so you should have your intranet in the same domain or save this info in a database.

    PHP will not get your system variables like you posted, PHP is not integrated in any OS, it's like any programming language, you build what you want.

    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题