Symfony2:从Windows会话中自动登录用户

时间:2013-05-29 10:18:29

标签: windows authentication symfony login ntlm

Symfony2我已经建立了一个内联网。它目前使用FOSUserBundleLDAP bundle来记录用户,我想添加从Windows会话中登录用户的功能。

我找到了an NTLM script用于PHP和an updated version,但我无法将它们合并到Symfony2中。

我还找到了an NTLM bundle for Symfony2,但它是为旧版本的Symfony编写的,不再维护。我无法重写它并让它发挥作用。

我的问题是;除了已经存在的LDAP功能外,我怎样才能在Symfony2-app中自动从他们的Windows会话登录用户?什么是最好最简单的方法?

1 个答案:

答案 0 :(得分:0)

查看Symfony\Component\Security\Http\Firewall文件夹中的类。

您还应该阅读此主题,其中包含有关实现您自己的AuthenticationListener的更多有用信息:https://groups.google.com/forum/#!topic/symfony-devs/oSUqDyMsZpI

文档中的这个页面应该为您提供实现自己的监听器所需的一切:http://symfony.com/doc/current/cookbook/security/custom_authentication_provider.html