Comments (9)
I'm having the exact same issue and I installed everything using composer.
from slim-oauth2.
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.
$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.
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.
Released #9 in v1.0.1 which contains the same fix for the HTTP_AUTHORIZATION issue as in v3.
from slim-oauth2.
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.
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.
@yeco are you still having the issue? If so are you using slim/http
in your composer.json?
from slim-oauth2.
Not anymore, please close the issue. Thanks!
from slim-oauth2.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slim-oauth2.