diff --git a/configuration/auth.html b/configuration/auth.html index 57f0f9d..a619e5a 100644 --- a/configuration/auth.html +++ b/configuration/auth.html @@ -191,6 +191,26 @@ VALUES 'guest_redirection' => 'http://example.com/wp-admin/', ... ] +
Replace your current Auth handler in configuration.php
file like this:
'Filegator\Services\Auth\AuthInterface' => [
+ 'handler' => '\Filegator\Services\Auth\Adapters\LDAP',
+ 'config' => [
+ 'private_repos' => false,
+ 'ldap_server'=>'ldap://192.168.1.1',
+ 'ldap_bindDN'=>'uid=ldapbinduser,cn=users,dc=ldap,dc=example,dc=com',
+ 'ldap_bindPass'=>'ldapbinduser-password',
+ 'ldap_baseDN'=>'cn=users,dc=ldap,dc=example,dc=com',
+ 'ldap_filter'=>'(uid=*)', //ex: 'ldap_filter'=>'(&(uid=*)(memberOf=cn=administrators,cn=groups,dc=ldap,dc=example,dc=com))',
+ 'ldap_userFieldMapping'=> [
+ 'username' =>'uid',
+ 'name' =>'cn',
+ 'userDN' =>'dn',
+ 'default_permissions' => 'read|write|upload|download|batchdownload|zip',
+ 'admin_usernames' =>['user1', 'user2'],
+ ],
+ ],
+ ],
If you want to use FileGator as a part of another application, you probably already have users stored somewhere else. What you need in this case is to build a new custom Auth adapter that matches the AuthInterface to connect those two. This new adapter will try to authenticate users in your application and translate each user into filegator User object.