@@ -10,16 +10,17 @@ Parse Server supports 3rd party authentication with
10
10
* Instagram
11
11
* Janrain Capture
12
12
* Janrain Engage
13
+ * LDAP
13
14
* LinkedIn
14
15
* Meetup
16
+ * Microsoft Graph
15
17
* PhantAuth
16
18
* QQ
17
19
* Spotify
18
20
* Twitter
19
21
* vKontakte
20
22
* WeChat
21
23
* Weibo
22
- * Microsoft Graph
23
24
24
25
Configuration options for these 3rd-party modules is done with the ` auth ` option passed to Parse Server:
25
26
@@ -188,6 +189,56 @@ Google oauth supports validation of id_token's and access_token's.
188
189
}
189
190
```
190
191
192
+ ### Configuring Parse Server for LDAP
193
+
194
+ The [ LDAP] ( https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol ) module can check if a
195
+ user can authenticate (bind) with the given credentials. Optionally, it can also check if the user is in a certain group.
196
+ This check is done using a user specified query, called an [ LDAP Filter] ( https://ldap.com/ldap-filters/ ) .
197
+ The query should return all groups which the user is a member of. The ` cn ` attribute of the query results is compared to ` groupCn ` .
198
+
199
+ To build a query which works with your LDAP server, you can use a LDAP client like [ Apache Directory Studio] ( https://directory.apache.org/studio/ ) .
200
+
201
+ ``` js
202
+ {
203
+ " ldap" : {
204
+ " url" : " ldap://host:port" ,
205
+ " suffix" : " the root of your LDAP tree" ,
206
+ " dn" : " Bind dn. {{id}} is replaced with the id suppied in authData" ,
207
+ " groupCn" : " Optional. A group which the user must be a member of." ,
208
+ " groupFilter" : " Optional. An LDAP filter for finding groups which the user is part of. {{id}} is replaced with the id supplied in authData."
209
+ }
210
+ }
211
+ ```
212
+
213
+ If either ` groupCN ` or ` groupFilter ` is not specified, the group check is not performed.
214
+
215
+ Example Configuration (this works with the public LDAP test server hosted by Forumsys):
216
+
217
+ ``` js
218
+ {
219
+ " ldap" : {
220
+ " url" : " ldap://ldap.forumsys.com:389" ,
221
+ " suffix" : " dc=example,dc=com" ,
222
+ " dn" : " uid={{id}}, dc=example, dc=com" ,
223
+ " groupCn" : " Chemists" ,
224
+ " groupFilter" : " (&(uniqueMember=uid={{id}},dc=example,dc=com)(objectClass=groupOfUniqueNames))"
225
+ }
226
+ }
227
+ ```
228
+
229
+ authData:
230
+
231
+ ``` js
232
+ {
233
+ " authData" : {
234
+ " ldap" : {
235
+ " id" : " user id" ,
236
+ " password" : " password"
237
+ }
238
+ }
239
+ }
240
+ ```
241
+
191
242
### LinkedIn ` authData `
192
243
193
244
``` js
@@ -211,6 +262,22 @@ Google oauth supports validation of id_token's and access_token's.
211
262
}
212
263
```
213
264
265
+ ### Microsoft Graph ` authData `
266
+
267
+ ``` js
268
+ {
269
+ " microsoft" : {
270
+ " id" : " user's microsoft id (string)" , // required
271
+ " access_token" : " an authorized microsoft graph access token for the user" , // required
272
+ " mail" : " user's microsoft email (string)"
273
+ }
274
+ }
275
+ ```
276
+
277
+ Learn more about [ Microsoft Graph Auth Overview] ( https://docs.microsoft.com/en-us/graph/auth/?view=graph-rest-1.0 ) .
278
+
279
+ To [ get access on behalf of a user] ( https://docs.microsoft.com/en-us/graph/auth-v2-user?view=graph-rest-1.0 ) .
280
+
214
281
### PhantAuth ` authData `
215
282
216
283
As of Parse Server 3.7.0 you can use [ PhantAuth] ( https://www.phantauth.net/ ) .
@@ -294,22 +361,6 @@ Learn more about [PhantAuth](https://www.phantauth.net/).
294
361
}
295
362
```
296
363
297
- ### Microsoft Graph ` authData `
298
-
299
- ``` js
300
- {
301
- " microsoft" : {
302
- " id" : " user's microsoft id (string)" , // required
303
- " access_token" : " an authorized microsoft graph access token for the user" , // required
304
- " mail" : " user's microsoft email (string)"
305
- }
306
- }
307
- ```
308
-
309
- Learn more about [ Microsoft Graph Auth Overview] ( https://docs.microsoft.com/en-us/graph/auth/?view=graph-rest-1.0 ) .
310
-
311
- To [ get access on behalf of a user] ( https://docs.microsoft.com/en-us/graph/auth-v2-user?view=graph-rest-1.0 ) .
312
-
313
364
## Custom authentication
314
365
315
366
It is possible to leverage the OAuth support with any 3rd party authentication that you bring in.
0 commit comments