public function authenticate(Request $request, Route $route)
    {
        if (! $user = $this->auth->user()) {
            throw new UnauthorizedHttpException(
                get_class($this),
                'Unable to authenticate with invalid API key and token.'
            );
        }

        return $user;
    }
public function authenticate(Request $request, Route $route)
    {
        if (! $user = $this->auth->user()) {
            throw new UnauthorizedHttpException(
                get_class($this),
                'Unable to authenticate with invalid API key and token.'
            );
        }

        return $user;
    }
public function authenticate ( Request $ request , Route $ route ) { if ( ! $ user = $ this -> auth -> user ( ) ) { throw new UnauthorizedHttpException ( get_class ( $ this ) , 'Unable to authenticate with invalid API key and token.' ) ; } return $ user ; }
Authenticate request with a Illuminate Guard.

@param \Illuminate\Http\Request $request
@param \Dingo\Api\Routing\Route $route

@return mixed
Authenticate request with a Illuminate Guard .