How to get DN and password with UnboundID

烂漫一生 提交于 2019-12-06 13:37:11

You should subclass LDAPListenerRequestHandler and implement processBindRequest. All the information you are looking for is included in BindRequestProtocolOp (second argument of processBindRequest). Add an empty implementation for all other abstract methods.

If request is your BindRequestProtocolOp instance then you get your information via:

String username = request.getBindDN();
ByteString password = request.getSimplePassword();

Many LDAP server implementations will not return a password and many will not return a password you can use. (ie it maybe a hash).

I would be very curious why there could be a reason to return the password.

-jim

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!