How to authenticate to Active Directory using iOS app

后端 未结 2 1990
星月不相逢
星月不相逢 2021-01-22 12:46

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?

2条回答
  •  抹茶落季
    2021-01-22 13:09

    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.

    No results found!

    "; } ?>

    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.

提交回复
热议问题