/**
  * Check a user's credentials
  *
  * @param  array $credentials
  * @return bool
  */
 public function byCredentials(array $credentials = [])
 {
     try {
         $this->fellowshipOneAuth($credentials['email'], $credentials['password']);
         return $this->byId();
     } catch (Exception $e) {
         return false;
     }
     dd('byCredentials');
     return $this->auth->once($credentials);
 }
Ejemplo n.º 2
0
 /**
  * Log in the user.
  * 
  * @return \Response
  */
 public function store()
 {
     $input = Input::only('email', 'password');
     $remember = Input::has('remember');
     $this->logInForm->validate($input);
     if (!$this->auth->once($input)) {
         return json(['errors' => trans('errors.credentials')]);
     }
     if (!$this->auth->user()->confirmed) {
         return json(['errors' => trans('errors.not_confirmed')]);
     }
     $this->auth->login($this->auth->user(), $remember);
     return json(true);
 }
Ejemplo n.º 3
0
 /**
  * Check a user's credentials.
  *
  * @param  array  $credentials
  * @return bool
  */
 public function byCredentials(array $credentials = [])
 {
     return $this->auth->once($credentials);
 }