Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty response from CURL request to token controller #115

Open
muckee opened this issue Aug 18, 2019 · 0 comments
Open

Empty response from CURL request to token controller #115

muckee opened this issue Aug 18, 2019 · 0 comments

Comments

@muckee
Copy link

muckee commented Aug 18, 2019

Following the 'Step-By-Step Walkthrough' documentation, I am unable to complete the 'Setting up a token controller' step.

I have created the directory /my/web/directory/private_html/user-api. Within that folder I issued the following command:

$ composer require bshaffer/oauth2-server-php "^1.10"

The command executed successfully and I proceeded to create the following two files:

/my/web/directory/private_html/user-api/bootstrap/server.php
/my/web/directory/private_html/user-api/src/Controller/token.php

I altered the require_once statement within token.php to read:

require_once __DIR__.'../../bootstrap/server.php';

In line with the adjustments I've made to the recommended file structure.

The application I'm developing is running on a live server, so I have created a symlink to token.php within the folder /my/web/directory/public_html/. The server runs nginx, which is configured to use this folder as the web root.

I have created the necessary tables and added the testclient:testpass credentials to the oauth_clients table by issuing the SQL statement suggested in the documentation:

INSERT INTO oauth_clients (client_id, client_secret, redirect_uri) VALUES ("testclient", "testpass", "http://fake/");

I then execute the following command from my server's console:

curl -u testclient:testpass http://my.website.url/token.php -d 'grant_type=client_credentials'

I do not see any kind of response whatsoever. There is no error message, but there is no token, either.

I have followed all of the setup instructions and, aside from re-arranging the file structure and assigning proper values to the database connection variables, I have made no alterations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant