-
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
資源