Symfony2: automatically logging in users from their Windows session

一笑奈何 提交于 2020-01-03 07:21:06

问题


In Symfony2 I have built an intranet. It currently uses the FOSUserBundle and an LDAP bundle to log users in, and I would like to add the functionality to log in user from their session in Windows.

I found an NTLM script for PHP and an updated version of it, but I haven't been able to incorporate them into Symfony2.

I also found an NTLM bundle for Symfony2, but it was written for an older version of Symfony and it is not maintained anymore. I was unable to rewrite it and get it to work.

My question is; how could I automatically log in users from their Windows session in my Symfony2-app, in addition to the already present LDAP functionality? What would be the best and easiest way?


回答1:


Take a look at the classes in the Symfony\Component\Security\Http\Firewall folder.

You should also read this thread with some more useful information on implementing your own AuthenticationListener: https://groups.google.com/forum/#!topic/symfony-devs/oSUqDyMsZpI

This page from the documentation should give you everything you need on implementing your own listener: http://symfony.com/doc/current/cookbook/security/custom_authentication_provider.html



来源:https://stackoverflow.com/questions/16811280/symfony2-automatically-logging-in-users-from-their-windows-session

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!