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