登录获取token
<p>[TOC]</p>
<h5>简要描述</h5>
<ul>
<li>登录获取token</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://ip:port/api/user/login</code></li>
</ul>
<h5>请求方式</h5>
<ul>
<li>GET </li>
</ul>
<h5>参数</h5>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">username</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">string</td>
<td>用户名</td>
</tr>
<tr>
<td style="text-align: left;">password</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">string</td>
<td>密码</td>
</tr>
</tbody>
</table>
<h5>返回示例</h5>
<pre><code> {
&quot;code&quot;: 0,
&quot;data&quot;: {
&quot;accessToken&quot;: &quot;eyJhbGciOiJSUzI1NiIsImtpZCI6IjNlNzk2NDZjNGRiYzQwODM4M2E5ZWVkMDlmMmI4NWFlIn0.eyJqdGkiOiJNLV9EM2dTRjhUX0JybWR4LUFJY3lBIiwiaWF0IjoxNzA2NTgxNzM4LCJleHAiOjE3MDkxNzM3MzgsIm5iZiI6MTcwNjU4MTczOCwic3ViIjoibG9naW4iLCJhdWQiOiJBdWRpZW5jZSIsInVzZXJOYW1lIjoiYWRtaW4ifQ.JR3UEj0Bx1GoyZE0oAgU_UziP2ZXByBF8mXQbyDO7iDVd5YKzO5ILdHkw7kDX8WyVvdHJvTLpySucU3fLYv2wq1JP82gpi5rxFeYhpIhYml5B4w7hU0b2flrRa_08NvPmmkCmiJyjqc98HR3HCfNchGX28snGY0fvLVSOturoQS7jm7dCM6890BInfxmLvbVhYmzg2_q35ZQLQVRa7Kn59TGnkcHLaZbisxDJ-HsospisDtOsnSYVacD0iUvDg752-BmKRXwUHZXs2gdkhJ4uIxHSbeqiz0H9pTKOjdMe2swYpWlCFm_v3i5swR8BqfDTyq0ZXsc_d-sYJn4GPtlFw&quot;,
&quot;accountNonExpired&quot;: true,
&quot;accountNonLocked&quot;: true,
&quot;credentialsNonExpired&quot;: true,
&quot;enabled&quot;: true,
&quot;id&quot;: 1,
&quot;role&quot;: {
&quot;authority&quot;: &quot;0&quot;,
&quot;createTime&quot;: &quot;2021-04-13 14:14:57&quot;,
&quot;id&quot;: 1,
&quot;name&quot;: &quot;admin&quot;,
&quot;updateTime&quot;: &quot;2021-04-13 14:14:57&quot;
},
&quot;username&quot;: &quot;admin&quot;
},
&quot;msg&quot;: &quot;成功&quot;
}</code></pre>
<h5>返回参数说明</h5>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">accessToken</td>
<td style="text-align: left;">STRING</td>
<td>TOKEN</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<ul>
<li>后续调用其他接口需要把该token值放到header中,示例:access-token:token值</li>
</ul>