예제 #1
0
 /**
  * Create a new remember token for the user if one doesn't already exist.
  *
  * @param  \Auth\UserInterface  $user
  * @return void
  */
 protected function createRememberTokenIfDoesntExist(UserInterface $user)
 {
     $rememberToken = $user->getRememberToken();
     if (empty($rememberToken)) {
         $this->refreshRememberToken($user);
     }
 }
 /**
  * Validate a user against the given credentials.
  *
  * @param  \Auth\UserInterface  $user
  * @param  array  $credentials
  * @return bool
  */
 public function validateCredentials(UserInterface $user, array $credentials)
 {
     $plain = $credentials['password'];
     return $this->hasher->check($plain, $user->getAuthPassword());
 }