{"id":187269,"date":"2020-11-01T17:27:58","date_gmt":"2020-11-01T09:27:58","guid":{"rendered":"http:\/\/4563.org\/?p=187269"},"modified":"2020-11-01T17:27:58","modified_gmt":"2020-11-01T09:27:58","slug":"%e5%be%ae%e6%9c%8d%e5%8a%a1%e4%b8%ad%e6%8f%90%e5%80%a1%e7%9a%84%e6%97%a0%e7%8a%b6%e6%80%81%e6%9c%8d%e5%8a%a1%ef%bc%8c%e5%85%b7%e4%bd%93%e5%8f%af%e8%a1%8c%e5%90%97%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=187269","title":{"rendered":"\u5fae\u670d\u52a1\u4e2d\u63d0\u5021\u7684\u65e0\u72b6\u6001\u670d\u52a1\uff0c\u5177\u4f53\u53ef\u884c\u5417\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5fae\u670d\u52a1\u4e2d\u63d0\u5021\u7684\u65e0\u72b6\u6001\u670d\u52a1\uff0c\u5177\u4f53\u53ef\u884c\u5417\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : James369 <\/span>  <span><i><\/i> 4<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u5728\u5fae\u670d\u52a1\u548c REST \u4e2d\uff0c\u5efa\u8bae\u670d\u52a1\u65e0\u72b6\u6001\u5316\uff08\u670d\u52a1\u5668\u4e0d\u4fdd\u5b58\u72b6\u6001\uff0c\u7531\u5ba2\u6237\u7aef\u8bf7\u6c42\u7684\u65f6\u5019\u81ea\u5df1\u5e26\u4e0a\u6765\uff0c\u8fbe\u5230\u8bf7\u6c42\u7684\u5e42\u7b49\u6027\uff09\uff0c\u8fd9\u6837\u6709\u5229\u4e8e\u96c6\u7fa4\u591a\u673a\u6269\u5c55\u3002<br \/>\u8fd9\u4e2a\u60f3\u60f3\u611f\u89c9\u4e0d\u53ef\u601d\u8bae\uff0cserver \u4e0d\u662f\u90fd\u6709 session \u4f1a\u8bdd\u5417\uff0c\u96be\u9053 session \u90fd\u4e0d\u8981\u4e86\uff1f<br \/>\u518d\u6bd4\u5982\u7535\u5546\u5e94\u7528\u7684\u8d2d\u7269\u8f66\uff0c\u80af\u5b9a\u5f97\u5b58\u5728\u670d\u52a1\u5668\u4e2d\u5427\uff0c\u5177\u4f53\u662f\u5982\u4f55\u5b9e\u65bd\u7684      <\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>6<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4064416\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : miser <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8be5\u5b58 DB \u5b58 DB\uff0c\u8be5\u7f13\u5b58\u7684\u7f13\u5b58\uff0c\u8be5 redis \u7684 redis\uff0csession \u672c\u8eab\u5c31\u662f\u4e00\u79cd\u5185\u5b58\u6570\u636e\uff0c\u53ea\u662f\u628a\u8fd9\u4e2a\u6570\u636e\u4ece\u5355\u72ec\u670d\u52a1\u5668\u4e00\u9053\u4e86\u4e00\u4e2a\u5927\u7684\u96c6\u7fa4\u800c\u5df2                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4064417\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lrvinye <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             token,\u5173\u952e\u8bcd JWT\uff0c\u4e0d\u8fc7\u6709\u65f6\u6548\u6027                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4064418\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : opengps <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             session \u8981\u96c6\u4e2d\u5171\u4eab\u5230\u7b2c\u4e09\u65b9\uff0c\u5c3d\u91cf\u907f\u514d\u6bcf\u53f0\u673a\u5668\u5b58\u81ea\u5df1\u7684\u7528\u6237\u4f1a\u8bdd\u72b6\u6001\uff0c\u4e0d\u7136\u540c\u4e00\u7528\u6237\u4ea7\u751f\u7684\u8fde\u63a5\u8fc7\u6765\u4e4b\u540e\uff0c\u4e0d\u4e00\u5b9a\u5b9e\u9645\u662f\u54ea\u53f0\u540e\u7aef\u673a\u5668\u627f\u8f7d\uff0c\u4f1a\u51fa\u73b0\u4e22\u5931\u4f1a\u8bdd\u7684\u95ee\u9898<\/p>\n<p>\u96c6\u7fa4\u8bbe\u8ba1\u7684\u7cfb\u7edf\uff0c\u4e00\u822c\u90fd\u4f1a\u6709\u7c7b\u4f3c\u7684\u8981\u6c42\u3002\u5355\u72ec\u641e\u4e00\u4e2a\u201c\u4f1a\u8bdd\u72b6\u6001\u670d\u52a1\u201d\uff0c\u6bd4\u5982\u5b58\u5230 redis\uff0c\u5b58\u5230\u6570\u636e\u5e93\u7b49\u7b49<br \/>\u5982\u679c\u5b9e\u5728\u662f\u6ca1\u8bbe\u8ba1\u6210\u65e0\u72b6\u6001\uff0c\u90a3\u5c31\u53ea\u80fd\u9760\u8d1f\u8f7d\u5747\u8861\u7684\u201c\u6539\u5199 cookie\u201d\u8fd9\u79cd\u65b9\u6848\u6765\u5b9e\u73b0\u591a\u53f0\u673a\u5668\u7ec4\u6210\u96c6\u7fa4\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4064419\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : acmore <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u65e0\u72b6\u6001\u4e0d\u662f\u670d\u52a1\u5668\u771f\u7684\u4e0d\u4fdd\u5b58\u72b6\u6001\uff0c\u800c\u662f\u5ba2\u6237\u7aef\u53ef\u4ee5\u901a\u8fc7\u51ed\u8bc1\u5728\u65e0\u611f\u77e5\u7684\u60c5\u51b5\u4e0b\u4ece\u4efb\u4f55\u4e00\u53f0\u673a\u5668\u8bf7\u6c42\u90fd\u80fd\u5f97\u5230\u4e00\u6837\u7684\u7ed3\u679c\u3002Session \u4e0d\u5927\u7684\u8bdd\u6bcf\u6b21\u76f4\u63a5\u5e26\u5728 Request Body \u4e2d\u4e5f\u672a\u5c1d\u4e0d\u53ef\uff0c\u6211\u5c31\u89c1\u8fc7\u5f88\u591a\u670d\u52a1\u628a\u4e00\u5806\u72b6\u6001\u6570\u636e\u585e\u5728 Jwt \u7684 Claims \u4e2d\u6765\u56de\u5012\u817e\u7684\u3002Session \u5927\u7684\u8bdd\u5c31\u653e\u5728 Redis \u96c6\u7fa4\uff0c\u968f\u7528\u968f\u62ff\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4064420\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xuanbg <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5bf9\u7684\uff0c\u4e0d\u8981\u4e86\u3002\u8bf7\u6c42\u5934\u5e26\u4e00\u4e2a token \u5c31\u5b8c\u4e86\u3002<\/p>\n<p>\u4e0d\u8fc7\uff0c\u8fd9\u4e2a\u548c session \u5e76\u6ca1\u6709\u4ec0\u4e48\u672c\u8d28\u533a\u522b\u3002\u53ea\u4e0d\u8fc7\u5206\u5e03\u5f0f\u7cfb\u7edf\u90fd\u4ea4\u7ed9\u4e00\u4e2a\u7edf\u4e00\u7684\u9a8c\u8bc1\u670d\u52a1\u53bb\u505a\u7528\u6237\u8eab\u4efd\u548c\u6743\u9650\u7684\u9a8c\u8bc1\u7f62\u4e86\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4064421\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xuanbg <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @acmore \u628a\u4e00\u5806\u72b6\u6001\u6570\u636e\u585e\u5728 Jwt \u7684 Claims \u4e2d\u6765\u56de\u5012\u817e\u7684\uff0c\u8bf4\u660e jwt \u5b9e\u9645\u4e0a\u5df2\u7ecf\u4e0d\u9002\u5408\u8fd9\u79cd\u573a\u666f\u4e86\u3002jwt \u7684\u5e94\u7528\u573a\u666f\u5176\u5b9e\u5e76\u4e0d\u5927\uff0c\u800c\u4e14\u53ea\u9002\u5408\u6bd4\u8f83\u5c0f\u578b\u7684\u7cfb\u7edf\u3002\u4e00\u4e2a\u5927\u578b\u7684\u7cfb\u7edf\uff0c\u7528\u6237\u80fd\u6709\u4e0a\u5343\u4e2a\u6743\u9650\uff0c\u8fd9\u4e9b\u6743\u9650\u6570\u636e\u76f4\u63a5\u53d1\u653e\u7ed9\u5ba2\u6237\u7aef\u7b80\u76f4\u5c31\u662f\u707e\u96be\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5fae\u670d\u52a1\u4e2d\u63d0\u5021\u7684\u65e0\u72b6\u6001\u670d\u52a1\uff0c\u5177\u4f53\u53ef\u884c&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/187269"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=187269"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/187269\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=187269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=187269"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=187269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}