title: Laravel 5 - Custom User Authentification with LDAP
body: <p>I would like to create a custom user authentification with LDAP - this is how it should work:</p>
  
  <p>User enters his credentials - I'll check with LDAP is the user exists, if yes I'll create a session in a database and return a valid token for a request. The token handler is not the problem, but I'm not sure about the LDAP Authentification.</p>
  
  <p>What I've already done:</p>
  
  <pre><code>activated php_ldap extension
  </code></pre>
  
  <p>Installed the php-ldap-module for L5 with the description from here:</p>
  
  <p><a href="http://packalyst.com/packages/package/strebl/l5-ldap-auth" rel="nofollow">http://packalyst.com/packages/package/strebl/l5-ldap-auth</a></p>
  
  <p>So now I've got my new Authentification Provider, but when I'll try with:</p>
  
  <pre class="lang-php prettyprint-override"><code>if (Auth::attempt(['email' =&gt; 'user', 'password' =&gt; 'password']))
  {
      .....
  }
  </code></pre>
  
  <p>Nothing happens - no error, no warning. Can I use now <code>Auth::attempt</code>, or is that another function for checking if a user exists in my LDAP Directory. Is it still <code>email</code> and <code>password</code> as properties for the login attempt? </p>
  
  <p>Is there somebody who is working with this extension and can give me some more information about the usage?</p>
  
  <p>Thanks in advance</p>