作者 何书鹏
1 个管道 的构建 通过 耗费 3 秒

检查token是否过期

... ... @@ -15,8 +15,20 @@ class Token extends Api
protected $noNeedRight = '*';
/**
* 检测Token是否过期
*
* @ApiWeigh (99)
* @ApiTitle (检测Token是否过期)
* @ApiSummary (检测Token是否过期)
* @ApiMethod (GET)
* @ApiHeaders (name="token", type="string", required=true, description="请求的Token")
* @ApiReturn({
"code": 1,
"msg": "",
"time": "1621402970",
"data": {
"token": "545eed64-39c4-437e-8285-ac94c03e4921", //token
"expires_in": 2591951 //剩余有效时间
}
})
*/
public function check()
{
... ... @@ -26,8 +38,20 @@ class Token extends Api
}
/**
* 刷新Token
*
* @ApiWeigh (97)
* @ApiTitle (刷新Token)
* @ApiSummary (刷新Token)
* @ApiMethod (GET)
* @ApiHeaders (name="token", type="string", required=true, description="请求的Token")
* @ApiReturn({
"code": 1,
"msg": "",
"time": "1621403556",
"data": {
"token": "175c6d84-42af-4c59-bce0-ad8a66eb5f3f", //token
"expires_in": 2592000 //剩余有效时间
}
})
*/
public function refresh()
{
... ...
... ... @@ -15,8 +15,20 @@ class Token extends Api
protected $noNeedRight = '*';
/**
* 检测Token是否过期
*
* @ApiWeigh (99)
* @ApiTitle (检测Token是否过期)
* @ApiSummary (检测Token是否过期)
* @ApiMethod (GET)
* @ApiHeaders (name="token", type="string", required=true, description="请求的Token")
* @ApiReturn({
"code": 1,
"msg": "",
"time": "1621402970",
"data": {
"token": "545eed64-39c4-437e-8285-ac94c03e4921", //token
"expires_in": 2591951 //剩余有效时间
}
})
*/
public function check()
{
... ... @@ -26,8 +38,20 @@ class Token extends Api
}
/**
* 刷新Token
*
* @ApiWeigh (97)
* @ApiTitle (刷新Token)
* @ApiSummary (刷新Token)
* @ApiMethod (GET)
* @ApiHeaders (name="token", type="string", required=true, description="请求的Token")
* @ApiReturn({
"code": 1,
"msg": "",
"time": "1621403556",
"data": {
"token": "175c6d84-42af-4c59-bce0-ad8a66eb5f3f", //token
"expires_in": 2592000 //剩余有效时间
}
})
*/
public function refresh()
{
... ...
... ... @@ -7223,7 +7223,24 @@
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
<div class="panel-body">
<table class="table table-hover">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必选</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>token</td>
<td>string</td>
<td></td>
<td>请求的Token</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="panel panel-default">
... ... @@ -7243,9 +7260,20 @@
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
<div class="panel-body">
<div class="headers">
<div class="form-group">
<label class="control-label" for="token">token</label>
<input type="string" class="form-control input-sm" id="token" required placeholder="请求的Token - Ex: " name="token">
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/v2.token/check" method="get" name="form87" id="form87">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/v2.token/check" method="GET" name="form87" id="form87">
<div class="form-group">
</div>
... ... @@ -7280,7 +7308,15 @@
<div class="tab-pane" id="sample87">
<div class="row">
<div class="col-md-12">
<pre id="sample_response87"></pre>
<pre id="sample_response87">{
"code": 1,
"msg": "",
"time": "1621402970",
"data": {
"token": "545eed64-39c4-437e-8285-ac94c03e4921", //token
"expires_in": 2591951 //剩余有效时间
}
}</pre>
</div>
</div>
</div><!-- #sample -->
... ... @@ -7315,7 +7351,24 @@
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
<div class="panel-body">
<table class="table table-hover">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必选</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>token</td>
<td>string</td>
<td></td>
<td>请求的Token</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="panel panel-default">
... ... @@ -7335,9 +7388,20 @@
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
<div class="panel-body">
<div class="headers">
<div class="form-group">
<label class="control-label" for="token">token</label>
<input type="string" class="form-control input-sm" id="token" required placeholder="请求的Token - Ex: " name="token">
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/v2.token/refresh" method="get" name="form88" id="form88">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/v2.token/refresh" method="GET" name="form88" id="form88">
<div class="form-group">
</div>
... ... @@ -7372,7 +7436,15 @@
<div class="tab-pane" id="sample88">
<div class="row">
<div class="col-md-12">
<pre id="sample_response88"></pre>
<pre id="sample_response88">{
"code": 1,
"msg": "",
"time": "1621403556",
"data": {
"token": "175c6d84-42af-4c59-bce0-ad8a66eb5f3f", //token
"expires_in": 2592000 //剩余有效时间
}
}</pre>
</div>
</div>
</div><!-- #sample -->
... ... @@ -15765,7 +15837,24 @@
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
<div class="panel-body">
<table class="table table-hover">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必选</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>token</td>
<td>string</td>
<td></td>
<td>请求的Token</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="panel panel-default">
... ... @@ -15785,9 +15874,20 @@
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
<div class="panel-body">
<div class="headers">
<div class="form-group">
<label class="control-label" for="token">token</label>
<input type="string" class="form-control input-sm" id="token" required placeholder="请求的Token - Ex: " name="token">
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/token/check" method="get" name="form24" id="form24">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/token/check" method="GET" name="form24" id="form24">
<div class="form-group">
</div>
... ... @@ -15822,7 +15922,15 @@
<div class="tab-pane" id="sample24">
<div class="row">
<div class="col-md-12">
<pre id="sample_response24"></pre>
<pre id="sample_response24">{
"code": 1,
"msg": "",
"time": "1621402970",
"data": {
"token": "545eed64-39c4-437e-8285-ac94c03e4921", //token
"expires_in": 2591951 //剩余有效时间
}
}</pre>
</div>
</div>
</div><!-- #sample -->
... ... @@ -15857,7 +15965,24 @@
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
<div class="panel-body">
<table class="table table-hover">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必选</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>token</td>
<td>string</td>
<td></td>
<td>请求的Token</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="panel panel-default">
... ... @@ -15877,9 +16002,20 @@
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
<div class="panel-body">
<div class="headers">
<div class="form-group">
<label class="control-label" for="token">token</label>
<input type="string" class="form-control input-sm" id="token" required placeholder="请求的Token - Ex: " name="token">
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/token/refresh" method="get" name="form25" id="form25">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/token/refresh" method="GET" name="form25" id="form25">
<div class="form-group">
</div>
... ... @@ -15914,7 +16050,15 @@
<div class="tab-pane" id="sample25">
<div class="row">
<div class="col-md-12">
<pre id="sample_response25"></pre>
<pre id="sample_response25">{
"code": 1,
"msg": "",
"time": "1621403556",
"data": {
"token": "175c6d84-42af-4c59-bce0-ad8a66eb5f3f", //token
"expires_in": 2592000 //剩余有效时间
}
}</pre>
</div>
</div>
</div><!-- #sample -->
... ... @@ -19477,7 +19621,7 @@
<div class="row mt0 footer">
<div class="col-md-6" align="left">
Generated on 2021-05-18 11:34:22 </div>
Generated on 2021-05-19 13:58:47 </div>
<div class="col-md-6" align="right">
<a href="./" target="_blank">My Website</a>
</div>
... ...