Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6800527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:58:48+00:00 2026-05-26T18:58:48+00:00

I am trying to create and iOS app that takes a users credentials and

  • 0

I am trying to create and iOS app that takes a users credentials and verifies it with the AD server. Is there some built in library in xCode to do that, or is it third party?

Any advice on direction to look would be greatly appreciated.

Thanks
Zach

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:58:49+00:00Added an answer on May 26, 2026 at 6:58 pm

    Ok, so this was the PHP i used to make the connection to the ldap server. i am not 100% sure what is happening here, i got this code from IT Coordinator at my company. I understand all the binding and searching parts, but i dont get the the ldap_set_option part of this whole thing. Anyway after setting it up this way, you can then call the URL of the php script and pass it parameters. take a look at the PHP, and the url example with be below.

    <?php
    //Connection parameters
    $dn = "DC=network,DC=net";
    $host = "ldap://ldap.network.com";
    $port = 1111
    
    $user = $_GET['user'];
    $pass = $_GET['pass'];
    
    //$user = "user@network.net";
    //$pass = "pass";
    
    $filter = "memberof";
    $keyword = "CN=USSC_ALL,CN=Users,DC=network,DC=net";
    
    $filter = "objectclass";
    $keyword = "user";
    
    $filter = "objectcategory";
    $keyword = "CN=Person,CN=Schema,CN=Configuration,DC=network,DC=net";
    
    //The real thing with PHP
    if (!empty($keyword) and !empty($dn)) {
    //Connect to the AD
    $adConn = ldap_connect($host, $port) or die("Could not connect!");
    
    //Set protocol verison
    ldap_set_option($adConn, LDAP_OPT_PROTOCOL_VERSION, 3) or die ("Could not set ldap     protocol1");
    
    //Set referrals... Won't work without this...
    ldap_set_option($adConn, LDAP_OPT_REFERRALS, 0) or die ("Could not set ldap protocol2");
    
    //Bind the user
    $bd = ldap_bind($adConn, $user, $pass) or die ("Could not bind");
    
    echo $bd;
    
     //End binding
    ldap_unbind($adConn);
    
    
    
    } else {
       echo "<p>No results found!</p>";
    }
    
    ?>
    
    
    </body>
    </html>  
    

    Ok so now all you have to do is pass a username and password to the script and it will return the bind. that will give you either true or false. meaning if it bound successfully it is a correct combination of username and password.

    this is how i am calling it:

    http://192.268.192.1/ldap.php?user=(username here)&pass=(password here)
    

    This is the approach that i took, and i think it is a very simple answer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're trying to make an iOS app that allows users to create geographical points
Trying to create my first iPhone app that would play back audio. When I
I am trying to create a jigsaw puzzle app for iOS. From my searches
Hi there I am trying to create a bug-free jquerymobile app across Android Browser,
I am trying to create an intro animation for my iOS app and am
I'm new to SQLite3 with iOS I'm trying to create an SQL Query that
I'm trying to create a multi-view iOS (4.3) application in xcode 4 using the
I'm trying to develop an iOS App that saves an ASIFormDataRequest (i.e Post with
I am trying to create a web app that will size itself to fill
I'm trying to make an iOS 5 app that features real-time things coming from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.