• <legend id='mOu99'><style id='mOu99'><dir id='mOu99'><q id='mOu99'></q></dir></style></legend>

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

    <tfoot id='mOu99'></tfoot>

      <i id='mOu99'><tr id='mOu99'><dt id='mOu99'><q id='mOu99'><span id='mOu99'><b id='mOu99'><form id='mOu99'><ins id='mOu99'></ins><ul id='mOu99'></ul><sub id='mOu99'></sub></form><legend id='mOu99'></legend><bdo id='mOu99'><pre id='mOu99'><center id='mOu99'></center></pre></bdo></b><th id='mOu99'></th></span></q></dt></tr></i><div id='mOu99'><tfoot id='mOu99'></tfoot><dl id='mOu99'><fieldset id='mOu99'></fieldset></dl></div>
        • <bdo id='mOu99'></bdo><ul id='mOu99'></ul>
      1. 如何访问此 LDAP 对象的属性?

        How can I access the attributes of this LDAP object?(如何访问此 LDAP 对象的属性?)
        • <i id='nc5Xf'><tr id='nc5Xf'><dt id='nc5Xf'><q id='nc5Xf'><span id='nc5Xf'><b id='nc5Xf'><form id='nc5Xf'><ins id='nc5Xf'></ins><ul id='nc5Xf'></ul><sub id='nc5Xf'></sub></form><legend id='nc5Xf'></legend><bdo id='nc5Xf'><pre id='nc5Xf'><center id='nc5Xf'></center></pre></bdo></b><th id='nc5Xf'></th></span></q></dt></tr></i><div id='nc5Xf'><tfoot id='nc5Xf'></tfoot><dl id='nc5Xf'><fieldset id='nc5Xf'></fieldset></dl></div>

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

                <bdo id='nc5Xf'></bdo><ul id='nc5Xf'></ul>
                  <tfoot id='nc5Xf'></tfoot>
                    <tbody id='nc5Xf'></tbody>
                  <legend id='nc5Xf'><style id='nc5Xf'><dir id='nc5Xf'><q id='nc5Xf'></q></dir></style></legend>

                • 本文介绍了如何访问此 LDAP 对象的属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我希望有人可以帮助我了解如何处理调用 DirContext.lookup 返回的对象.

                  I'm hoping someone can help me understand how to work with the object returned by a call to DirContext.lookup.

                  以下代码片段有效并返回一个对象.我只是不知道如何从对象中获取属性.

                  The following code snippet works and returns an object. I just can't figure out how to get the attributes from the object.

                  javax.naming.directory.DirContext ctx =
                      javax.naming.directory.getContext(false);
                  Object o = ctx.lookup(rdn); 
                  

                  任何帮助将不胜感激.

                  推荐答案

                  属性 attrs = ctx.getAttributes(dn);假设请求 artibute 值的条目具有适当的权限,则将检索用户属性.

                  Attributes attrs = ctx.getAttributes(dn); will retrieve the user attributes assuming the entry asking for the arrtibute values has proper rights.

                  但是,最佳做法是只查询所需的属性.

                  However, best practice is you only query for the attributes you need.

                  如果您希望查看所有属性,您应该查询 objectclass 属性值,然后查询架构以获取所有"分配的属性并决定您需要检索哪些属性.

                  If you wish to see all attributes, you should query the objectclass attribute values and then query the schema to obtain "all" the attributes assigned and decide which attributes you need to retrieve.

                  -吉姆

                  这篇关于如何访问此 LDAP 对象的属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Slf4j LoggerFactory.getLogger and sonarqube(Slf4j LoggerFactory.getLogger 和 sonarqube)
                  Security - Array is stored directly(安全性 - 数组直接存储)
                  SonarQube quot;Class Not Foundquot; during Main AST Scan(SonarQube“找不到类在主 AST 扫描期间)
                  Integrate Spock#39;s test with Sonar(将 Spock 的测试与声纳集成)
                  How do I make Hudson/Jenkins fail if Sonar thresholds are breached?(如果违反声纳阈值,我如何让 Hudson/Jenkins 失败?)
                  automatically add curly brackets to all if/else/for/while etc. in a java code-base(自动将大括号添加到 java 代码库中的所有 if/else/for/while 等)
                    <bdo id='K0AAD'></bdo><ul id='K0AAD'></ul>

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

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

                            <tfoot id='K0AAD'></tfoot>
                              <tbody id='K0AAD'></tbody>
                            <legend id='K0AAD'><style id='K0AAD'><dir id='K0AAD'><q id='K0AAD'></q></dir></style></legend>