2018年10月

参考文章
php oauth2 server 搭建方法及其简单应用(bshaffer/oauth2-server-php)
https://www.kefong.com/post/6.html

esp8266对接天猫精灵(7)OAuth2.0
https://blog.csdn.net/qq_35527832/article/details/79144117

oauth2-server-php-docs 概念
https://www.cnblogs.com/endv/p/7842515.html


curl http://localhost/oauth2-server-php/token2.php --data "grant_type=authorization_code&code=24d99fc58fd19f209aed5628f82f49391b8e7ff6&client_id=testclient&client_secret=testpass"

http://localhost/oauth2-server-php/authorize.php?response_type=code&client_id=testclient&state=xyz

http://localhost/oauth2-server-php/authorize.php?response_type=code&client_id=testclient&state=xyz&redirect_uri=http://fake/

curl http://localhost/oauth2-server-php/token2.php --data "grant_type=authorization_code&client_id=testclient&client_secret=testpass&&redirect_uri=http://fake/&code=26ebe01f096cdc21cf9b8c483f6f144b7a2d8205"

curl http://localhost/oauth2-server-php/token2.php -d "grant_type=authorization_code&client_id=testclient&client_secret=testpass&&redirect_uri=http://fake/&code=069b5138dc0cc4e78aa6675d7d07f8b0cdc9babb"

curl http://localhost/oauth2-server-php/token2.php -d "grant_type=refresh_token&client_id=testclient&client_secret=testpass&refresh_token=8fb7d4fc5bdd267df0607fe83c5ffc741ff6dd3b

curl http://localhost/oauth2-server-php/token.php -d "grant_type=client_credentials&client_id=testclient&client_secret=testpass