获取Token
<p>[TOC]</p>
<h5>简要描述</h5>
<ul>
<li>获取Token</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://127.0.0.1:1280/api/ClientUser/LoginAsync</code></li>
</ul>
<h5>请求方式</h5>
<ul>
<li>POST </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;">secret</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">string</td>
<td>私钥</td>
</tr>
</tbody>
</table>
<h5>返回示例</h5>
<pre><code> {
&quot;Entity&quot;: {
&quot;Iss&quot;: &quot;HCloud&quot;,
&quot;Ip&quot;: &quot;127.0.0.1:59866&quot;,
&quot;Nbf&quot;: 1712458724,
&quot;Exp&quot;: 1712462324,
&quot;Iat&quot;: 1712458724,
&quot;UserId&quot;: &quot;0d2af97a1d704ed184355f092e07b897&quot;,
&quot;UserNickName&quot;: &quot;管理员&quot;,
&quot;UserAccountName&quot;: &quot;6972&quot;,
&quot;UserPsnId&quot;: null,
&quot;UserPsnCode&quot;: null,
&quot;UserPsnName&quot;: null,
&quot;CompanyId&quot;: &quot;033573a264&quot;,
&quot;CompanyName&quot;: &quot;WebApi&quot;,
&quot;OrganId&quot;: &quot;f1684df790054e349d62c03ae2dca1ec&quot;,
&quot;OrganCode&quot;: &quot;00&quot;,
&quot;OrganName&quot;: &quot;**&quot;,
&quot;OrganIsAcc&quot;: true,
&quot;AccsetID&quot;: &quot;&quot;,
&quot;AccsetName&quot;: &quot;&quot;,
&quot;HeadImgUrl&quot;: &quot;&quot;,
&quot;Headers&quot;: {
&quot;SysType&quot;: &quot;pc-web&quot;,
&quot;LoginDate&quot;: &quot;2024-04-07 10:58:44.941&quot;,
&quot;FailureDate&quot;: &quot;2024-04-07 11:58:44.941&quot;,
&quot;CacheTimeSpan&quot;: &quot;3600&quot;
},
&quot;ServerCode&quot;: null,
&quot;Guid&quot;: &quot;dbfd973e7c5e4c5688b0adab3e6f0e39&quot;,
&quot;WorkStation&quot;: null,
&quot;OrganType&quot;: &quot;webapi&quot;,
&quot;OrganTypeName&quot;: null,
&quot;DataRights&quot;: null,
&quot;AllowLoginType&quot;: [],
&quot;OrganAuthRange&quot;: [
&quot;self&quot;,
&quot;myorgan&quot;,
&quot;suborgan&quot;
],
&quot;LoginType&quot;: &quot;webapi&quot;,
&quot;SystemType&quot;: &quot;webapi&quot;,
&quot;LimitType&quot;: null,
&quot;InviteCode&quot;: null,
&quot;EnableDate&quot;: null,
&quot;DisableDate&quot;: null,
&quot;TimeSpanMin&quot;: null,
&quot;DeptId&quot;: null,
&quot;DeptCode&quot;: null,
&quot;DeptName&quot;: null,
&quot;ClientId&quot;: null,
&quot;ECode&quot;: null
},
&quot;Pager&quot;: null,
&quot;OnlyEntity&quot;: false,
&quot;IsSucceed&quot;: true,
&quot;Message&quot;: null,
&quot;StatusCode&quot;: 200
}</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;">Entity</td>
<td style="text-align: left;">string</td>
<td>返回内容 其中Guid的值 为Token</td>
</tr>
<tr>
<td style="text-align: left;">Message</td>
<td style="text-align: left;">string</td>
<td>返回消息</td>
</tr>
<tr>
<td style="text-align: left;">StatusCode</td>
<td style="text-align: left;">int</td>
<td>返回代码 200为成功,其他为异常</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
<li>C#代码示例 [调用登录获取Token.zip](<a href="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=8cec0423f4947f875cedb1bab9a4cee0">https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=8cec0423f4947f875cedb1bab9a4cee0</a> "[调用登录获取Token.zip")</li>
</ul>