Bearer Token怎么用?
Bearer Token拿到以后,需要在http请求中,添加header:
Authorization: Bearer <token>
例如:
curl -X 'GET' \
'http://localhost:1337/games/count' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiaWF0IjoxNjIyNjg2MjUzLCJleHAiOjE2MjUyNzgyNTN9.Fs9AhAgpBvSBy'
扫一扫关注微信公众号:耿直的IT男阿斌
聊一聊IT男眼中的世界