new LDAP(options, authData)
Parse Server Configuration
To configure Parse Server for LDAP authentication, use the following structure:
{
auth: {
ldap: {
url: 'ldaps://ldap.example.com',
suffix: 'ou=users,dc=example,dc=com',
groupCn: 'admins',
groupFilter: '(memberUid={{id}})',
tlsOptions: {
rejectUnauthorized: false
}
}
}
}
Authentication Process
- Validates the provided
authDatausing an LDAP bind operation. - Optionally, verifies that the user belongs to a specific group by performing an LDAP search using the provided
groupCnorgroupFilter.
Auth Payload
The adapter requires the following authData fields:
id: The user's LDAP username.password: The user's LDAP password.
Example Auth Payload
{
"ldap": {
"id": "jdoe",
"password": "password123"
}
}
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | The adapter configuration options. Properties
| ||||||||||||||||||||||||||||
authData | Object | The authentication data provided by the client. Properties
|
Example
Configuration Example
// Example Parse Server configuration:
const config = {
auth: {
ldap: {
url: 'ldaps://ldap.example.com',
suffix: 'ou=users,dc=example,dc=com',
groupCn: 'admins',
groupFilter: '(memberUid={{id}})',
tlsOptions: {
rejectUnauthorized: false
}
}
}
};