0

Question: why can I not authenticate a known registered user through Adldap despite being able to access information about the user using Adldap on laravel 5.2?

I am attempting to use Adldap on laravel 5.2 to authenticate users at a university. I have successfully managed to connect to the ldap server with the admin credentials and can even retrieve information about the user. `

namespace App\Http\Controllers;

use Auth;
use Input;
use Adldap;

class AuthController extends Controller
{
    public function authenticate()
    {

        $username = Input::get('username');

        $password = Input::get('password');

        $authentic = Adldap::authenticate($username,$password);

        $userData = Adldap::users()->find($username);

        var_dump( $authentic );

        dd( $userData );

    }
}

`

when I try to log in, dumping $authentic gives me false despite having the correct password (I dumped it as well to check). However, with the same username if I dump $userData i get a massive array of (correct) user information. Using my username, if I open the $userData object up I can see what email groups i'm in, my campus mailing address, my work title etc. Dumped variables. I am very new to using ldap and am not quite sure how everything works. Also, its probably worth noting that despite me being the guy doing the setup and such I do not have much access to the servers. Everything is on an as needed basis.

One though was that the ldap server took care of any password hashing on that end. However, since i'm getting connected but the authentication fails could it be that I need to hash the password on my end? Please explain any solutions in detail. As an Ag engineer none of this is exactly my field but sometimes branching out is a necessity.

There are no errors. I'm on wamp and in logs/php_error (I assume this is the equivalent local version of /var/log/debug). Additionally, apache_error shows no problems.

Collin Craige
  • 109
  • 1
  • 8

2 Answers2

0

You better check the messages created in /var/log/debug while trying to log in. Please add these messages to this post.

0

There was no "error" on my end. The Ldap server was simply configured to accept the users full email address and not their short id as I was using.

Collin Craige
  • 109
  • 1
  • 8