summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDavid Young <davidy@funkypenguin.co.nz>2017-08-22 10:04:48 +1200
committerFred <fred@kanboard.net>2017-08-25 20:04:43 -0700
commit76a0e55f40da15995e7b80baa68d07c1a8f96a81 (patch)
tree30f020551223849c2197e1bda81de3db7c496701 /doc
parent0583cfcd5c3cff95e1792ab7a58652c0f4c3c7de (diff)
Add example for LDAPS usage
Diffstat (limited to 'doc')
-rw-r--r--doc/en_US/ldap-authentication.markdown27
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/en_US/ldap-authentication.markdown b/doc/en_US/ldap-authentication.markdown
index e994c149..6d80e9db 100644
--- a/doc/en_US/ldap-authentication.markdown
+++ b/doc/en_US/ldap-authentication.markdown
@@ -153,6 +153,33 @@ define('LDAP_USER_BASE_DN', 'ou=People,dc=example,dc=com');
define('LDAP_USER_FILTER', 'uid=%s');
```
+Example for LDAPS (SSL-encryption)
+----------------------------------
+
+Some LDAP servers are configured for "LDAPS" connectivity only (on port 636). This is different to TLS, which starts off in cleartext (port 389 by default) and then sets up encryption over the same channel.
+
+To tell PHP to use LDAPS, you need to prefix the name of your LDAP server with "ldaps://", as in the example below:
+
+Our LDAP server is `myserver.example.com` and is only accessible via LDAPS. Most likely we won't want to validate the server cert, and we DON'T want TLS.
+
+For this example we use the anonymous binding.
+
+```php
+<?php
+
+// Enable LDAP authentication (false by default)
+define('LDAP_AUTH', true);
+
+// LDAP server hostname
+define('LDAP_SERVER', 'ldaps://myserver.example.com');
+
+// By default, require certificate to be verified for ldaps:// style URL. Set to false to skip the verification
+define('LDAP_SSL_VERIFY', false);
+
+// Enable LDAP START_TLS
+define('LDAP_START_TLS', false);;
+```
+
Disable automatic account creation
-----------------------------------