-
StackOverflow 文档
-
oauth 教程
-
OAuth 2.0 客户端
-
授权代码授予
步骤 1
GET /authorize?response_type=code&client_id=[APP_KEY]&state=[RANDOM_STRING]
&redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb
&scope=[OPTIONAL_SCOPES] HTTP/1.1
Host: server.example.com
第 2 步
POST /token HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code&code=[CODE_FROM_STEP1]
&client_id=[APP_KEY]&client_secret=[APP_SECRET]
&redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb
资源