/** * Log a user into the application without sessions or cookies. * * @param array $credentials * @return bool * @static */ public static function once($credentials = array()) { return \Illuminate\Auth\Guard::once($credentials); }
/** * Attempts to login using either an email/password or a username/password combination. * * @param string $username * @param string $password * * @return boolean */ private function login($username, $password) { $identifier = filter_var($username, FILTER_VALIDATE_EMAIL) ? 'email' : 'name'; $authorized = $this->auth->once([$identifier => $username, 'password' => $password]); return $authorized == true; }