LDAP Authentication for Uploaders

Any feature requests go in here...

LDAP Authentication for Uploaders

Postby fels » Mon Apr 04, 2011 1:28 pm

Hello,

I would like to allow uploads for authenticated users only. Authentication should be done via a LDAP database,
where all allowed users can be found.

Greetings
Frank
fels
Premium
 
Posts: 7
Joined: Fri Apr 01, 2011 12:13 pm

Re: LDAP Authentication for Uploaders

Postby PeterS » Mon Apr 04, 2011 11:31 pm

fels wrote:Hello,

I would like to allow uploads for authenticated users only. Authentication should be done via a LDAP database,
where all allowed users can be found.

Greetings
Frank


What do you mean by a LDPA auth/database? Are you referring to a member's area where users can upload/manage their own files?
PeterS
Global Moderator
 
Posts: 159
Joined: Mon Feb 21, 2011 4:58 am

Re: LDAP Authentication for Uploaders

Postby fels » Mon Apr 11, 2011 12:32 pm

LDAP is a central directory service which helps to consolidate authentication as the directory service stores user names and passwords. The Microsoft name for LDAP is Active Directory, the Linux name is just LDAP.

There are extensions to Perl and PHP (php-ldap) and so on, that helps to authenticate a user against a LDAP database,
e.g. http://php.net/manual/en/book.ldap.php

--- piece of php code ---

<?php
$username = "jdoe";
$bindpw = "secret";
$ldapproxy = "ldaps://ldap-01.uos.de";
$ldapconn = ldap_connect($ldapproxy, 636)
or die("no conn");
if ($ldapconn) {
ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3);
$binddn = sprintf("uid=%s, ...);
$ldapbind = @ldap_bind($ldapconn, $binddn, $bindpw);
if ($ldapbind)
echo "user auth successful";
else
echo "user auth failed";
ldap_close($ldapconn);
}
?>
----


Regards Frank
fels
Premium
 
Posts: 7
Joined: Fri Apr 01, 2011 12:13 pm


Return to Feature Request

Who is online

Users browsing this forum: No registered users and 1 guest

cron