original_string: public function login(Listener $listener, array $input, ThrottlesCommand $throttles = null)
      {
          $validation = $this->validator->on('login')->with($input);
  
          // Validate user login, if any errors is found redirect it back to
          // login page with the errors.
          if ($validation->fails()) {
              return $listener->userLoginHasFailedValidation($validation->getMessageBag());
          }
  
          if ($this->hasTooManyAttempts($throttles)) {
              return $this->handleUserHasTooManyAttempts($listener, $input, $throttles);
          }
  
          if ($this->authenticate($input)) {
              return $this->handleUserWasAuthenticated($listener, $input, $throttles);
          }
  
          return $this->handleUserFailedAuthentication($listener, $input, $throttles);
      }
code: public function login(Listener $listener, array $input, ThrottlesCommand $throttles = null)
      {
          $validation = $this->validator->on('login')->with($input);
  
          // Validate user login, if any errors is found redirect it back to
          // login page with the errors.
          if ($validation->fails()) {
              return $listener->userLoginHasFailedValidation($validation->getMessageBag());
          }
  
          if ($this->hasTooManyAttempts($throttles)) {
              return $this->handleUserHasTooManyAttempts($listener, $input, $throttles);
          }
  
          if ($this->authenticate($input)) {
              return $this->handleUserWasAuthenticated($listener, $input, $throttles);
          }
  
          return $this->handleUserFailedAuthentication($listener, $input, $throttles);
      }
code_tokens: public function login ( Listener $ listener , array $ input , ThrottlesCommand $ throttles = null ) { $ validation = $ this -> validator -> on ( 'login' ) -> with ( $ input ) ; // Validate user login, if any errors is found redirect it back to // login page with the errors. if ( $ validation -> fails ( ) ) { return $ listener -> userLoginHasFailedValidation ( $ validation -> getMessageBag ( ) ) ; } if ( $ this -> hasTooManyAttempts ( $ throttles ) ) { return $ this -> handleUserHasTooManyAttempts ( $ listener , $ input , $ throttles ) ; } if ( $ this -> authenticate ( $ input ) ) { return $ this -> handleUserWasAuthenticated ( $ listener , $ input , $ throttles ) ; } return $ this -> handleUserFailedAuthentication ( $ listener , $ input , $ throttles ) ; }
docstring: Login a user.
  
  @param  \Orchestra\Contracts\Auth\Listener\AuthenticateUser  $listener
  @param  array  $input
  @param  \Orchestra\Contracts\Auth\Command\ThrottlesLogins|null  $throttles
  
  @return mixed
docstring_tokens: Login a user .