Giter VIP home page Giter VIP logo

Comments (9)

yeco avatar yeco commented on May 19, 2024

I'm having the exact same issue and I installed everything using composer.

from slim-oauth2.

arnokoehler avatar arnokoehler commented on May 19, 2024

You might have an issue with the oauth header - the auth variable is killed by php, that is something that you have to fix when setting up your SLIM api.

from slim-oauth2.

arnokoehler avatar arnokoehler commented on May 19, 2024

$this->headers['Authorization'] this one is not there in the code until you fix something with the AUTHORIZATION header like this in .htacces

RewriteEngine On
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]

from slim-oauth2.

chadicus avatar chadicus commented on May 19, 2024

Actually, if it is indeed the HTTP_AUTHORIZATION header issue, there is a fix for that in v3. I can do a backport of the fix for v1 if needed.

from slim-oauth2.

chadicus avatar chadicus commented on May 19, 2024

Released #9 in v1.0.1 which contains the same fix for the HTTP_AUTHORIZATION issue as in v3.

from slim-oauth2.

yeco avatar yeco commented on May 19, 2024

Weird, still not working... The interesting part is that if I do it with curl it works fine.
curl -X POST -d client_id=client -d client_secret=secret -d grant_type=client_credentials http://localhost/api/token

But if I send the same params in a querystring in a POST it doesn't.
http://localhost/api/token?client_id=client&client_secret=secret&grant_type=client_credentials

Am I missing something?

from slim-oauth2.

chadicus avatar chadicus commented on May 19, 2024

I think the underlying oauth2 server ignores the query parameters when the request is a POST. Use something like Postman and try sending the parameters in the body of the request.

from slim-oauth2.

chadicus avatar chadicus commented on May 19, 2024

@yeco are you still having the issue? If so are you using slim/http in your composer.json?

from slim-oauth2.

yeco avatar yeco commented on May 19, 2024

Not anymore, please close the issue. Thanks!

from slim-oauth2.

Related Issues (8)

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.