Symfony2的:从他们的Windows会话的用户自动登录 [英] Symfony2: automatically logging in users from their Windows session

查看:138
本文介绍了Symfony2的:从他们的Windows会话的用户自动登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

的Symfony2 我已经建立了一个内部​​网。目前,它使用了 FOSUserBundle LDAP捆绑登录用户,我想补充的功能,日志从他们的Windows会话的用户。

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.

我发现的NTLM 的脚本PHP和的an更新版吧,但我一直无法将其纳入Symfony2的。

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

我还发现为Symfony2的的NTLM包,但它是一个老版本的Symfony的书面和它不再被维护。我无法改写它,得到它的工作。

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.

我的问题是;我怎么能自动登录在我的Symfony2应用其Windows会话的用户,除了已经present LDAP 功能?什么是最好的和最简单的方法是什么?

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?

推荐答案

您可以在的Symfony \\分量\\安全\\ HTTP \\防火墙文件夹看一下类。

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

您也应该对实现自己的AuthenticationListener一些有用的信息,请阅读此线程:的 https://groups.google.com/forum/#​​!topic/symfony-devs/oSUqDyMsZpI

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

这从文档页面应该给你你需要实现自己的听众一切:的http://symfony.com/doc/current/cookbook/security/custom_authentication_provider.html

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

这篇关于Symfony2的:从他们的Windows会话的用户自动登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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