• <legend id='a6Xno'><style id='a6Xno'><dir id='a6Xno'><q id='a6Xno'></q></dir></style></legend>
      <bdo id='a6Xno'></bdo><ul id='a6Xno'></ul>
  • <tfoot id='a6Xno'></tfoot>
    1. <small id='a6Xno'></small><noframes id='a6Xno'>

      <i id='a6Xno'><tr id='a6Xno'><dt id='a6Xno'><q id='a6Xno'><span id='a6Xno'><b id='a6Xno'><form id='a6Xno'><ins id='a6Xno'></ins><ul id='a6Xno'></ul><sub id='a6Xno'></sub></form><legend id='a6Xno'></legend><bdo id='a6Xno'><pre id='a6Xno'><center id='a6Xno'></center></pre></bdo></b><th id='a6Xno'></th></span></q></dt></tr></i><div id='a6Xno'><tfoot id='a6Xno'></tfoot><dl id='a6Xno'><fieldset id='a6Xno'></fieldset></dl></div>

      1. 保持 LDAP 会话

        时间:2024-08-23

          <bdo id='3iSEj'></bdo><ul id='3iSEj'></ul>
                <tbody id='3iSEj'></tbody>
              <legend id='3iSEj'><style id='3iSEj'><dir id='3iSEj'><q id='3iSEj'></q></dir></style></legend>
              • <tfoot id='3iSEj'></tfoot>

                <i id='3iSEj'><tr id='3iSEj'><dt id='3iSEj'><q id='3iSEj'><span id='3iSEj'><b id='3iSEj'><form id='3iSEj'><ins id='3iSEj'></ins><ul id='3iSEj'></ul><sub id='3iSEj'></sub></form><legend id='3iSEj'></legend><bdo id='3iSEj'><pre id='3iSEj'><center id='3iSEj'></center></pre></bdo></b><th id='3iSEj'></th></span></q></dt></tr></i><div id='3iSEj'><tfoot id='3iSEj'></tfoot><dl id='3iSEj'><fieldset id='3iSEj'></fieldset></dl></div>
                1. <small id='3iSEj'></small><noframes id='3iSEj'>

                2. 本文介绍了保持 LDAP 会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在 PHP 中,假设我在第 1 页上有一个 LDAP 连接:

                  In PHP, say I have an LDAP connection on page 1:

                  $ldapconn = ldap_connect($ldapserver);
                  if ($ldapconn) {
                        // binding to ldap server
                        $ldapbind = ldap_bind($ldapconn, $ldaprdn, $ldappass);
                  }
                  // do stuff here
                  

                  假设一切顺利并且我能够实际做一些事情,我该如何保存这个绑定,以便当用户点击第二页时,我不需要再次使用他们的用户名/密码执行 ldap_bind.本质上,如果出于安全目的可以避免,我不想将密码存储在会话中,但我想保持连接,以便我可以在其他页面上重复使用它.

                  Assuming everything goes well and I'm able to actually do stuff, how can I save this bind so that when a user clicks on a 2nd page I don't need to again do an ldap_bind using their username/password. In essence I don't want to store the password in the session if avoidable for security purposes, but I'd like to keep the connection so that I can reuse it on other pages.

                  推荐答案

                  PHP LDAP 不支持持久连接.根据您正在执行的 LDAP 查询类型和频率,您始终可以设置一个数据库,以加密状态存储用户名/密码,然后将 ID 保留在会话中的该记录中(不好存储用户名/密码的想法).类似于这里的回答.如果您扩展您正在尝试做的事情,也许会帮助我们指导您更好地完成它.如果它只是用于验证登录,那么一旦它们通过 LDAP 验证,您就可以在会话中输入一个值,表明它们已经过验证.

                  PHP LDAP doesn't support persistent connections. Depending on what kind of LDAP queries you're doing and how often, you could always set up a database that would store the username/password in encrypted state, then keep the ID to that record in the session (not a good idea to store usernames/passwords). Similar to what is answered here. Perhaps if you expand on what you're trying to do will help us guide you in a better direction on how to accomplish it. If it's simply for validating login then once they are validated against LDAP you can put a value in the session that says they're validated.

                  这篇关于保持 LDAP 会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:使用 PHP 和 LDAP 连接到 Microsoft Office 365 下一篇:LDAP 过滤器 - 查找特定 OU 的所有用户

                  相关文章

                  1. <tfoot id='mB1RA'></tfoot>
                    <legend id='mB1RA'><style id='mB1RA'><dir id='mB1RA'><q id='mB1RA'></q></dir></style></legend>

                    <small id='mB1RA'></small><noframes id='mB1RA'>

                    <i id='mB1RA'><tr id='mB1RA'><dt id='mB1RA'><q id='mB1RA'><span id='mB1RA'><b id='mB1RA'><form id='mB1RA'><ins id='mB1RA'></ins><ul id='mB1RA'></ul><sub id='mB1RA'></sub></form><legend id='mB1RA'></legend><bdo id='mB1RA'><pre id='mB1RA'><center id='mB1RA'></center></pre></bdo></b><th id='mB1RA'></th></span></q></dt></tr></i><div id='mB1RA'><tfoot id='mB1RA'></tfoot><dl id='mB1RA'><fieldset id='mB1RA'></fieldset></dl></div>
                    • <bdo id='mB1RA'></bdo><ul id='mB1RA'></ul>