Update ReadMe.md
parent
ece28073c3
commit
4800d5ffc0
|
@ -92,14 +92,12 @@
|
|||
<p>
|
||||
<code>如何刷新access_token(refresh_token)</code>, 在通过客户端(如移动设备)登录成功后返回的数据如下
|
||||
<br/>
|
||||
<pre>
|
||||
{"access_token":"3420d0e0-ed77-45e1-8370-2b55af0a62e8","token_type":"bearer","refresh_token":"b36f4978-a172-4aa8-af89-60f58abe3ba1","expires_in":43199,"scope":"read write"}
|
||||
<pre>{"access_token":"3420d0e0-ed77-45e1-8370-2b55af0a62e8","token_type":"bearer","refresh_token":"b36f4978-a172-4aa8-af89-60f58abe3ba1","expires_in":43199,"scope":"read write"}
|
||||
</pre>
|
||||
<br/>
|
||||
若需要刷新获取新的token(一般在 expires_in 有效期时间快到时), 请求的URL类似如下
|
||||
<br/>
|
||||
<pre>
|
||||
http://localhost:8080/oauth/token?client_id=mobile-client&client_secret=mobile&grant_type=refresh_token&refresh_token=b36f4978-a172-4aa8-af89-60f58abe3ba1
|
||||
<pre>http://localhost:8080/oauth/token?client_id=mobile-client&client_secret=mobile&grant_type=refresh_token&refresh_token=b36f4978-a172-4aa8-af89-60f58abe3ba1
|
||||
</pre>
|
||||
<br/>
|
||||
注意: refresh_token 参数值必须与登录成功后获取的 refresh_token 一致, 且grant_type = refresh_token
|
||||
|
|
Loading…
Reference in New Issue