Authenticate on LDAP with current user in JNDI/Java(使用 JNDI/Java 中的当前用户在 LDAP 上进行身份验证)
问题描述
我以为我会找到有关此主题的更多信息,但我没有.
I thought I'd find more about this topic but I didn't.
我必须编写一个 java 应用程序来检查特定用户属于哪个用户.
I have to write a java application that checks which ou a specific user is part of.
但是要通过服务器进行身份验证,我不能要求用户名和密码,也不能将其存储在源(或其他文件)中.
But to authenticate with the server I can't ask for username and password and also can't store it in the source (or some other file).
JNDI 和 Java 有没有办法对当前登录的用户进行身份验证?
Is there a way with JNDI and Java to authenticate with the user who is currently logged in?
推荐答案
由于似乎没有真正的解决方案,我现在在脚本/工具的开头请求登录信息并在需要时使用它.
Since it seems that there is no real solution to this, I now go with requesting Login information at the start of the script/tool and using it when needed.
这篇关于使用 JNDI/Java 中的当前用户在 LDAP 上进行身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 JNDI/Java 中的当前用户在 LDAP 上进行身份验证
基础教程推荐
- 验证是否调用了所有 getter 方法 2022-01-01
- 从 python 访问 JVM 2022-01-01
- 如何在 Spring @Value 注解中正确指定默认值? 2022-01-01
- 大摇大摆的枚举 2022-01-01
- Java 实例变量在两个语句中声明和初始化 2022-01-01
- 在 Java 中创建日期的正确方法是什么? 2022-01-01
- 不推荐使用 Api 注释的描述 2022-01-01
- Java Swing计时器未清除 2022-01-01
- 多个组件的复杂布局 2022-01-01
- 如何在 JFrame 中覆盖 windowsClosing 事件 2022-01-01
