test_client update

pull/4/head
shengzhaoli.shengz 1 year ago
parent e6223b19cf
commit ab7bc33f9a

@ -241,12 +241,28 @@
<p>设备上请求 <code>/oauth2/device_authorization</code>获取 <em>user_code</em>, <p>设备上请求 <code>/oauth2/device_authorization</code>获取 <em>user_code</em>,
<em>device_code</em>,<em>verification_uri</em></p> <em>device_code</em>,<em>verification_uri</em></p>
<form th:action="@{/oauth2/device_authorization}" th:method="post" target="_blank"> <form th:action="@{/oauth2/device_authorization}" th:method="post" target="_blank">
<input type="hidden" name="client_id" value="{{clientId}}"/> <table class="table table-striped table-bordered table-hover">
<input type="hidden" name="client_secret" value="{{clientSecret}}"/> <tr>
<input type="hidden" name="scope" value="{{scope}}"/> <td>client_id</td>
<button class="btn btn-link" type="submit"> <td>
/oauth2/device_authorization?client_id={{clientId}}&client_secret={{clientSecret}}&scope={{scope}} <input type="text" readonly="readonly" name="client_id" size="70" value="{{clientId}}"/>
</button> </td>
</tr>
<tr>
<td>client_secret</td>
<td>
<input type="text" readonly="readonly" name="client_secret" size="70"
value="{{clientSecret}}" placeholder="请先在页面最上面输入client_secret"/>
</td>
</tr>
<tr>
<td>scope</td>
<td>
<input type="text" readonly="readonly" name="scope" size="70" value="{{scope}}"/>
</td>
</tr>
</table>
<button class="btn btn-info" type="submit">/oauth2/device_authorization</button>
<span class="label label-warning">POST</span> <span class="label label-warning">POST</span>
</form> </form>
<p class="help-block">一般此步骤是在设备上通过代码来完成, 此处只作演示流程</p> <p class="help-block">一般此步骤是在设备上通过代码来完成, 此处只作演示流程</p>
@ -269,17 +285,39 @@
<br/> <br/>
直到获取成功(即第2步操作完成授权设备登录)或超时(即设备轮询请求等待的时长超出第1步返回的时间<em>expires_in</em>) 直到获取成功(即第2步操作完成授权设备登录)或超时(即设备轮询请求等待的时长超出第1步返回的时间<em>expires_in</em>)
</p> </p>
device_code: <input type="text" ng-model="deviceCode" <p class="help-block">请输入device_code后点击按钮地址.</p>
placeholder="GQ-K6n5kwLfu3XpDja-b3SlPbTfqYir..." size="70"/>
<form th:action="@{/oauth2/token}" th:method="post" target="_blank"> <form th:action="@{/oauth2/token}" th:method="post" target="_blank">
<input type="hidden" name="client_id" value="{{clientId}}"/> <table class="table table-striped table-bordered table-hover">
<input type="hidden" name="client_secret" value="{{clientSecret}}"/> <tr>
<input type="hidden" name="grant_type" <td>client_id</td>
value="urn:ietf:params:oauth:grant-type:device_code"/> <td>
<input type="hidden" name="device_code" value="{{deviceCode}}"/> <input type="text" readonly="readonly" name="client_id" size="70" value="{{clientId}}"/>
<button class="btn btn-link" type="submit"> </td>
/oauth2/token?client_id={{clientId}}&client_secret={{clientSecret}}&device_code={{deviceCode}}&grant_type=urn:ietf:params:oauth:grant-type:device_code </tr>
</button> <tr>
<td>client_secret</td>
<td>
<input type="text" readonly="readonly" name="client_secret" size="70"
value="{{clientSecret}}" placeholder="请先在页面最上面输入client_secret"/>
</td>
</tr>
<tr>
<td>grant_type</td>
<td>
<input type="text" readonly="readonly" name="grant_type" size="70" value="urn:ietf:params:oauth:grant-type:device_code"/>
<p class="help-block">固定值</p>
</td>
</tr>
<tr>
<td>device_code</td>
<td>
<input type="text" ng-model="deviceCode" name="device_code"
placeholder="GQ-K6n5kwLfu3XpDja-b3SlPbTfqYir..." size="70"/>
<p class="help-block">请输入device_code</p>
</td>
</tr>
</table>
<button class="btn btn-primary" type="submit">/oauth2/token</button>
<span class="label label-warning">POST</span> <span class="label label-warning">POST</span>
</form> </form>
<p class="help-block">提示在第2步进行过程中调用第3步获取token API时会响应等待授权的结果(Http状态码 400, <p class="help-block">提示在第2步进行过程中调用第3步获取token API时会响应等待授权的结果(Http状态码 400,

Loading…
Cancel
Save