来源:https://www.cnblogs.com/jxl123456/p/12504439.html
区别:我下载的是最新的abp mvc框架,接口有点不同
1、申请token,AbpFramework.Api.Controllers》AccountController》Authenticate(LoginModel loginModel)
地址:http://localhost:61814/api/Account/Authenticate
参数:{"userNameOrEmailAddress":"admin","password":"xxxxxx","tenancyName":"Default"}
返回结果:
{ "result": "TokenString", "targetUrl": null, "success": true, "error": null, "unAuthorizedRequest": false, "__abp": true }
2、再去请求别的接口时在header中携带用得到的TokenString,Bearer TokenString中间有空格分开
Content-Type:application/json
Authorization:Bearer TokenString
测试发送请求使用软件:postman