Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个使用 LDAP 身份验证的 php / Symfony 2 应用程序。我想使用相同的登录凭据将用户登录到另一个使用来自同一 Active Directory 的身份验证的网站。在我的控制器中,我知道我可以执行以下操作来获取登录用户:
$loggedInUser = $this->get('security.context')->getToken()->getUser();
我可以看到用户名。但是,我看不到密码。这大概是件好事。但是,如果没有密码,我不确定我是否知道如何登录用户。
不确定这是否真的是一个答案,但是,我决定对此采取不同的方法。我重新提示用户输入密码。这对我来说最有意义。