public function getToken($request = null)
    {
        $request = $request ?: $this->makeRequest();

        list($token) = sscanf($request->header($this->getAuthHeaderKey()), 'Bearer %s');
        if( ! $token) {
            $name = $this->getInputName();
            $token = $request->input($name);
        }

        return $token;
    }
public function getToken($request = null)
    {
        $request = $request ?: $this->makeRequest();

        list($token) = sscanf($request->header($this->getAuthHeaderKey()), 'Bearer %s');
        if( ! $token) {
            $name = $this->getInputName();
            $token = $request->input($name);
        }

        return $token;
    }
public function getToken ( $ request = null ) { $ request = $ request ? : $ this -> makeRequest ( ) ; list ( $ token ) = sscanf ( $ request -> header ( $ this -> getAuthHeaderKey ( ) ) , 'Bearer %s' ) ; if ( ! $ token ) { $ name = $ this -> getInputName ( ) ; $ token = $ request -> input ( $ name ) ; } return $ token ; }
Get the JWT token from the request

We'll check the Authorization header first, and if that's not set
then check the input to see if its provided there instead.

@param Request|null $request

@return string|null
Get the JWT token from the request