oauth2-server-php icon indicating copy to clipboard operation
oauth2-server-php copied to clipboard

"grant_type=password" and not "grant_type=user_credentials", & unidentified user_id

Open alkhoo opened this issue 13 years ago • 1 comments

NOTE: Brent (maintainer) helped me resolve the grant_type issue, found a new side issue. Here's what I did:

  • Insert Username: `testuser` and Password: `testpass` into the `oauth_users` table, add whatever you wish in `last_name` and `first_name`
  • Add to `token.php` `$server->addGrantType(new OAuth2_GrantType_UserCredentials($storage));`
  • `curl -u testclient:testpass http://localhost/token.php -d 'grant_type=password&username:testuser&password=testpass'`
  • Output (with refresh_token turned on): `/usr/share/nginx/www/oauth2/src/OAuth2/GrantType/UserCredentials.php on line 54 {"access_token":"9f1bc0dcf4dc5bad2e3122e6b9df1fbee680d742","expires_in":604800,"token_type":"bearer","scope":null,"refresh_token":"29ea40be1092d17191e80fd530aa43dd09389bf9"}`

    alkhoo avatar May 19 '13 17:05 alkhoo

Thank you for posting this in case anyone else runs into the same issue!

bshaffer avatar May 19 '13 18:05 bshaffer