1、先请求后台登录接口,获取到令牌
2、保存令牌,所有的后台请求接口都附带令牌提交
3、令牌需放入请求头中(只能放在请求头中)令牌提交方式:
Authorization:Bearer 调用登录接口后获取到的令牌举个栗子:
Authorization:Bearer yJhbGciOiJIUado0dfu893u89dInR5cCI6IkpXVCJ9.eyJhY2NvU90ui0sdu89i0-df3AiOjE3MzAwMDkzNjcsIm9yaWdfaWF0IjoxNzI5NDAsdif90sdia90dsJ1aWQiOjF9YPadsfi90i9igjFOoSCvJQ-d9m9LykPj_VRkI9csN_qA