Authenticating with mod_auth_ldap

A place for users and developers of the Xataface to discuss and receive support.

Authenticating with mod_auth_ldap

Postby gthorne » Fri Aug 31, 2012 1:55 pm

Hi, I'm on a server that uses .htaccess files and mod_auth_ldap for authentication. So, the authentication is taken care of even before it makes it to the Xataface application. Really, the only need I have for authentication is to track which users made what changes. Do I need to make a whole new Xataface authentication plugin to accomplish this?
gthorne
 
Posts: 32
Joined: Tue Jul 17, 2012 2:47 pm

Re: Authenticating with mod_auth_ldap

Postby shannah » Sat Sep 08, 2012 10:13 am

You don't necessarily need an authentication module in this case, although you could write one. The name of the logged in user should be accessible to you via the server environment variables.

E.g. Try printing the $_SERVER variable to see where it is (i.e. print_r($_SERVER); )

Once you know how to find out who is logged in, you can use this anywhere in your application instead of using the AuthenticationTool to find the logged in user.

If you wanted to be able to use the authentication tool still (e.g. to add a level of consistency with other apps) you could write an authentication module that would simply return the ldap username as the logged in username.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Authenticating with mod_auth_ldap

Postby gthorne » Mon Sep 10, 2012 2:38 pm

That's what I was looking for, thanks Steve!
gthorne
 
Posts: 32
Joined: Tue Jul 17, 2012 2:47 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 3 guests

Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved