Giter Club home page Giter Club logo

api-proxy-laravel's People

Contributors

fminov avatar thinkingmik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

api-proxy-laravel's Issues

Laravel 5 Issues

This is currently unusable on L5. When running the php artisan config:publish andreoli/api-proxy-laravel command, I get the following error:

➜  project git:(oauth) ✗ php artisan config:publish andreoli/api-proxy-laravel
PHP Fatal error:  Call to undefined method Illuminate\Foundation\Application::error() in /home/vagrant/Code/project/vendor/andreoli/api-proxy-laravel/src/Andreoli/ApiProxy/ApiProxyServiceProvider.php on line 75

This is because L5 removed the Application::error() method.

Proxy not forwarding errors

Hello,

First of all thanks for this great package !

I'm experiencing a problem implementing it with oauth2-server-laravel, here is the scenario :

I'm making a GET call to the proxy with appropriate params to obtain an access token (uri oauth/access_token).
The proxy forwards the request to the API in GET, but my API routes only contains a POST route to oauth/access_token. So a Laravel method not allowed exception is raised (debug on).
Instead of forwarding this exception, I get a fatal "Cannot use object of type GuzzleHttp\Stream\Stream as array" from the proxy.

This happens here in RequestManager :

            $content = $proxyResponse->getContent();
            $content = ProxyAux::addQueryValue($content, ProxyAux::COOKIE_URI, $this->uri);

ProxyAux::addQueryValue expects an array in first param, but a Guzzle stream is returned by getContent.

I'm on tag 1.0.0 but seeing master code it should behave the same.
I'm on tag 5.3.0 for guzzlehttp.

Thanks for your help !

why not guzzle ~6.x

is it possible to add support for guzzle 6.3.x. it seems you are using guzzle ~5.0 which is quite outdated.

Thank you

Error when trying to get Resource Owner ID

I have added this proxy to handle our ember stuff. our API uses oauth2-server-laravel and we can get the resource Owner ID by calling $this->authorizer->getResourceOwnerId() in the proper class.
However when our ember app logs in, we need to get the resource owner Id still, but when I call that from a function that is used through the proxy, I get 500 error:

Server error response [url] http://api.example.dev/v1/proxyUser [status code] 500 [reason phrase] Internal Server Error
/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php
line: 89

Is there something different I need to do to grab data from the Authorizer when using the proxy?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.