src/AuthManager.php
public function authenticate($credentials, $remember = false, $login = true)
    {
        try {
            $user = $this->sentinel->authenticate($credentials, $remember, $login);
        } catch (Exception $e) {
            return $this->returnException($e);
        }

        if ($user) {
            $message = request()->expectsJson() ?
                $this->translate('session_initated', 'You have been authenticated.') : null;
            return new SuccessReply($message);
        }

        $message = $this->translate('failed_authorization', 'Access denied due to invalid credentials.');
        return new FailureReply($message);
    }
public function authenticate($credentials, $remember = false, $login = true)
    {
        try {
            $user = $this->sentinel->authenticate($credentials, $remember, $login);
        } catch (Exception $e) {
            return $this->returnException($e);
        }

        if ($user) {
            $message = request()->expectsJson() ?
                $this->translate('session_initated', 'You have been authenticated.') : null;
            return new SuccessReply($message);
        }

        $message = $this->translate('failed_authorization', 'Access denied due to invalid credentials.');
        return new FailureReply($message);
    }
public function authenticate ( $ credentials , $ remember = false , $ login = true ) { try { $ user = $ this -> sentinel -> authenticate ( $ credentials , $ remember , $ login ) ; } catch ( Exception $ e ) { return $ this -> returnException ( $ e ) ; } if ( $ user ) { $ message = request ( ) -> expectsJson ( ) ? $ this -> translate ( 'session_initated' , 'You have been authenticated.' ) : null ; return new SuccessReply ( $ message ) ; } $ message = $ this -> translate ( 'failed_authorization' , 'Access denied due to invalid credentials.' ) ; return new FailureReply ( $ message ) ; }
Attempt to authenticate a user
@param  array $credentials
@param  boolean $remember
@param  boolean $login
@return Reply
Attempt to authenticate a user