curl jwt

[root@lnmp public]# curl -X POST -d "email=test115@163.com&password=115115" http://192.168.2.131/api/auth/login

{"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC8xOTIuMTY4LjIuMTMxXC9hcGlcL2F1dGhcL2xvZ2luIiwiaWF0IjoxNTQ3Nzk2ODkxLCJleHAiOjE1NDc4MDA0OTEsIm5iZiI6MTU0Nzc5Njg5MSwianRpIjoieGZkeFZLNEdxNTR3MkVObyIsInN1YiI6MywicHJ2IjoiODdlMGFmMWVmOWZkMTU4MTJmZGVjOTcxNTNhMTRlMGIwNDc1NDZhYSJ9.WZw3B-13kIzSVkGsc7UMDzTxPuM1GIIIQ2Ct0KxTZ_w","token_type":"bearer","expires_in":3600}

[root@lnmp public]# 

[root@lnmp public]# curl --request POST http://192.168.2.131/api/auth/me -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC8xOTIuMTY4LjIuMTMxXC9hcGlcL2F1dGhcL2xvZ2luIiwiaWF0IjoxNTQ3Nzk2ODkxLCJleHAiOjE1NDc4MDA0OTEsIm5iZiI6MTU0Nzc5Njg5MSwianRpIjoieGZkeFZLNEdxNTR3MkVObyIsInN1YiI6MywicHJ2IjoiODdlMGFmMWVmOWZkMTU4MTJmZGVjOTcxNTNhMTRlMGIwNDc1NDZhYSJ9.WZw3B-13kIzSVkGsc7UMDzTxPuM1GIIIQ2Ct0KxTZ_w"

{"id":3,"name":"\u601d\u7389","email":"test115@163.com","password":"$2y$10$\/LLPjHg9fmlDGOr04uSpqu\/j8HYMcDRwa1kyVA0RX694P4hWnO0BW","remember_token":"QyMoedejU8MVAcLe0vBg7Bwa65et2xAunyUxdVVo3ZJP51bSO37bJS6NghoK","created_at":"2019-01-18 03:12:22","updated_at":"2019-01-18 03:12:22"}

[root@lnmp public]# 

    A+
发布日期:2019年01月18日  所属分类:未分类

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: