ldap authentication

SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
I'm interested in authenticating visitors to the site with ldap and active directory.

Are there jamroom triggers in place which might help cope with that?

Has anyone already made a module to handle anything similar?


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 04/06/15 06:59:55AM
brian
@brian
10 years ago
10,149 posts
What you would want to do here is use a db_get_item listener, and then in your listener check that:

- $_post['module'] = 'jrUser'
- $_post['option'] = 'login_save'

If that is the case, global $_post and check that $_post['user_email_or_name'] = LDAP username and $_post['user_password'] matches.

http://php.net/manual/en/book.ldap.php

Your listener would need to connect to the LDAP server and do the validation. If the login is INVALID, just do:

jrCore_set_form_notice('error', 26);
jrCore_form_result();

From right within your listener and that will give the user the "invalid user name or password" error.

Let me know if that helps.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

updated by @brian: 02/26/15 09:42:37AM
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
Thanks Brian, much appreciated, I'm sure that will help.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

Tags