LDAP C ++ API的选择 [英] LDAP c++ API choice

查看:706
本文介绍了LDAP C ++ API的选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Linux下我自己的LDAP客户端,具体写信给我们当地的环境。最有可能我会用QT4提供前端有光泽,没有什么麻烦。

I would like to write my own LDAP client under Linux, specific to our local environment. Most probably I will use QT4 to provide a shiny frontend without much hassle.

我发现,似乎有这个问题没有标准C ++库。 OpenLDAP的提供一个C API和也应该有一个C ++ API(实验?)的地方。

I found that there seems to be no standard C++ library for this. OpenLDAP provides a C API and there should also be a C++ API (experimental?) somewhere..

我是否需要使用C的东西或者是有一个C ++ API那里的建议值得?

Do I need to use the C stuff or is there a C++ API out there worth of recommendation?

推荐答案

其实我已经写过的OpenLDAP的C API一个C ++包装为我的日常工作​​,这是不是我最愉快的经历。

I've actually written a C++ wrapper for OpenLDAP's C API for my day job and it wasn't my most enjoyable experience.

我没有找到一个合适的C ++包装在那里我的目的(这是在2006年这样的事情可能有所改变)。我结束了与C API,这是不可怕直接交互,但它确实有一些古怪。假设你到C / OpenLDAP的路线我可以给你一些提示。

I didn't find a suitable C++ wrapper out there for my purposes (this was in 2006 so things may have changed since). I wound up directly interacting with the C api, which wasn't terrible but it does have some oddities. Assuming you go to the C/OpenLDAP route I can offer you a couple of tips.

东西,我发现了一个有点古怪的C API在 RFC1823 这意味着pretty定义多每个图书馆都有相同的API。

Something that I found a little weird, the C API is defined in RFC1823 which means that pretty much every library has the same API.

在的OpenLDAP的情况下然而许多的RFC1823 API调用的已去precated,特别是围绕认证部件。根据谁分布式您OpenLDAP的库,它是什么版本将确定这些德precated功能已被禁用。

In the case of OpenLDAP however a number of the RFC1823 API calls have been deprecated, particularly around the authentication parts. Depending on who distributed your OpenLDAP library and what version it is will determine if these deprecated functions have been disabled.

要避免去precated API的主要变化是从 ldap_init开关() ldap_open() ldap_initialize(),并使用 ldap_sasl_bind()(这容易混淆处理所有类型的AUTH的)

The main changes to avoid the deprecated API are switching from ldap_init() and ldap_open() to ldap_initialize() and using ldap_sasl_bind() (which confusingly handles all types of auth)

这篇关于LDAP C ++ API的选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆