💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
## 登陆 /** * 登陆 * @http post * @datetime 2017-10-17T10:51:13+0800 * @param string $username * @param string $password * @author 韩文博 */ ### token 用于每次请求资源接口需要携带在头部的Authorization里,值为"Bearer Token",Bearer空格加Token token是会过期的,默认为259200秒,3天时间 记得定时重新刷新token,这儿缺少一个刷新token的接口 #### 请求非登陆资源示例: ~~~ GET /admin/user/search HTTP/1.1 Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjEsInVzZXJfaWQiOjEsImlhdCI6MTUwODIxOTkzMywiZXhwIjoxNTA4NDc5MTMzLCJzY29wZSI6bnVsbCwiYWNjZXNzX3Rva2VuIjoiMGJmNzdiNjkxYWQ5M2Q1ZGIxNGNhMDVlNmZjNGM2NWQifQ.IM1OpRTMylbsIBSJof77aZjNBnDmuXEI7GYEGwbLpIA Host: localhost Connection: close User-Agent: Paw/3.1.4 (Macintosh; OS X/10.12.6) GCDHTTPRequest ~~~ +++ get:/admin/member/login <<< success { "code": 0, "msg": "操作成功", "result": { "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjEsInVzZXJfaWQiOjEsImlhdCI6MTUwODIxOTkzMywiZXhwIjoxNTA4NDc5MTMzLCJzY29wZSI6bnVsbCwiYWNjZXNzX3Rva2VuIjoiMGJmNzdiNjkxYWQ5M2Q1ZGIxNGNhMDVlNmZjNGM2NWQifQ.IM1OpRTMylbsIBSJof77aZjNBnDmuXEI7GYEGwbLpIA" } } <<< +++