Jump to content

Using LDAP to authenticate users: Difference between revisions

From NusaATK
m LDAP authentication atk moved to Using LDAP to authenticate users
No edit summary
Line 1: Line 1:
Below you'll find a short example of configuring an ATK application for using LDAP authentication. Also (if LDAP authentication fails) the normal authentication using the password in the database is used.
{{howto|Easy|[[Dennis Luitwieler]] <dennis at ibuildings dot nl>}}
 
Below you'll find a short example of configuring an ATK application for using LDAP authentication. A
 
lso (if LDAP authentication fails) the normal authentication using the password in the database is used.


<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
$config_authentication = "ldap,db";
$config_authentication = "ldap,db";
</syntaxhighlight>
This makes the users authenticate against an LDAP server. If they are not found there, or the password doesn't match, the application will try to authenticate against the database. If you only want to authenticate against LDAP, use "ldap" instead of "ldap,db".


// LDAP auth. stuf
<syntaxhighlight lang="php">
$config_auth_ldap_host          = "127.0.0.1"; //ip of ldap server
$config_auth_ldap_host          = "127.0.0.1"; //ip of ldap server
$config_auth_ldap_context        = "ou=somevalue,dc=somevalue,dc=nl";
$config_auth_ldap_context        = "ou=somevalue,dc=somevalue,dc=nl";
$config_auth_ldap_search_filter  = "uid";
$config_auth_ldap_search_filter  = "uid";
</syntaxhighlight>
</syntaxhighlight>
The context and search filter depend on your ldap setup. Consult the administrator of the ldap server to get the values of ou and dc.

Revision as of 10:54, 19 December 2007

ATK Howto: Using LDAP to authenticate users

Complexity: Easy
Author: Dennis Luitwieler <dennis at ibuildings dot nl>

List of other Howto's

Below you'll find a short example of configuring an ATK application for using LDAP authentication. A

lso (if LDAP authentication fails) the normal authentication using the password in the database is used.

$config_authentication = "ldap,db";

This makes the users authenticate against an LDAP server. If they are not found there, or the password doesn't match, the application will try to authenticate against the database. If you only want to authenticate against LDAP, use "ldap" instead of "ldap,db".

$config_auth_ldap_host           = "127.0.0.1"; //ip of ldap server
$config_auth_ldap_context        = "ou=somevalue,dc=somevalue,dc=nl";
$config_auth_ldap_search_filter  = "uid";

The context and search filter depend on your ldap setup. Consult the administrator of the ldap server to get the values of ou and dc.