Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
170 views
in Technique[技术] by (71.8m points)

Using LDAP for authentication in iOS

I have been looking for a tutorial on using LDAP on an iOS device is this possible? I havent seen any articles or tutorials on it. Is there another way I should be going about doing authentication against my Active Directory? Can anyone point me in the right direction?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I have a port of OpenLDAP with Cyrus-SASL and OpenSSL in my iOS Ports project: https://github.com/bindle/iOSPorts

If using Xcode 4.3 or later, please verify that the Xcode commandline tools are installed before using the following instructions.

To include LDAP support:

  1. Clone the project: git clone git://github.com/bindle/iOSPorts.git
  2. Add the project file iOSPorts/ports/database/openldap/openldap.xcodeproj to your Xcode project.
  3. Navigate to the "Build Phases" tab for your build target.
  4. In "Target Dependencies", add "ldap (openldap)". This will cause the required source code to be downloaded and compiled when you build your target.
  5. In "Link Binary With Libraries", add the following libraries:
    • libresolv.dylib
    • libssl.a
    • libcrypto.a
    • liblber.a
    • libldap.a
    • libsasl2.a
  6. Under the "Build Settings", add "/iOSPorts/include" to the "User Header Search Paths".

The OpenLDAP client libraries should now be available from within your project. I have an example project for iOS in examples/database/openldap/ldapsearch (the example returns the search results using NSLog()).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...