Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Commit

Permalink
Added ability to handle a discovered user during authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebauman committed Jul 11, 2016
1 parent 3c10d95 commit c2e7690
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/AdldapAuthUserProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,18 @@ protected function handleAuthenticatedWithCredentials(User $user, $model)
//
}

/**
* Handle discovered LDAP users before they are authenticated.
*
* @param \Adldap\Models\User $user
*
* @return void
*/
protected function handleDiscoveredUserWithCredentials(User $user)
{
//
}

/**
* Retrieves the Adldap User model from the specified Laravel model.
*
Expand Down Expand Up @@ -177,6 +189,9 @@ protected function authenticateWithCredentials(array $credentials = [])
])->first();

if ($user instanceof User) {
// Perform operations on the discovered user.
$this->handleDiscoveredUserWithCredentials($user);

// Retrieve the authentication username for the AD user.
$username = $this->getUsernameFromAdUser($user);

Expand Down

0 comments on commit c2e7690

Please sign in to comment.