{"id":10006967,"date":"2022-12-15T05:43:52","date_gmt":"2022-12-14T21:43:52","guid":{"rendered":"https:\/\/ityet.com\/?p=10006967"},"modified":"2022-12-15T05:43:52","modified_gmt":"2022-12-14T21:43:52","slug":"%e5%85%ac%e5%8f%b8%e4%ba%a7%e5%93%81%e5%a4%aa%e5%a4%9a%e4%ba%86%ef%bc%8c%e6%80%8e%e4%b9%88%e5%ae%9e%e7%8e%b0%e4%b8%80%e6%ac%a1%e7%99%bb%e5%bd%95%e4%ba%a7%e5%93%81%e4%ba%92%e9%80%9a%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10006967","title":{"rendered":"\u516c\u53f8\u4ea7\u54c1\u592a\u591a\u4e86\uff0c\u600e\u4e48\u5b9e\u73b0\u4e00\u6b21\u767b\u5f55\u4ea7\u54c1\u4e92\u901a\uff1f"},"content":{"rendered":"<p>\u4f5c\u8005\uff1a\u738b\u8001\u72ee \/<br \/>\u6765\u6e90\uff1ajuejin.cn\/post\/7123787027652280356<\/p>\n<p>\u6700\u8fd1\u5f00\u53d1\u65b0\u4ea7\u54c1\uff0c\u7136\u540e\u8001\u677f\u8bf4\u6211\u4eec\u73b0\u5728\u7cfb\u7edf\u592a\u591a\u4e86\uff0c\u6bcf\u6b21\u5207\u6362\u7cfb\u7edf\u767b\u5f55\u592a\u9ebb\u70e6\u4e86\uff0c\u80fd\u4e0d\u80fd\u505a\u4e2a\u4f18\u5316\uff0c\u540c\u4e00\u8d26\u53f7\u4e92\u901a\u6389\u3002\u4f5c\u4e3a\u4e00\u4e2a\u8d44\u6df1\u67b6\u6784\u72ee\uff0c\u8001\u677f\u7684\u8981\u6c42\u80af\u5b9a\u8981\u6ee1\u8db3\uff0c\u5b89\u6392\uff01<\/p>\n<p>\u4e00\u4e2a\u516c\u53f8\u4ea7\u54c1\u77e9\u9635\u6bd4\u8f83\u4e30\u5bcc\u7684\u65f6\u5019\uff0c\u7528\u6237\u5728\u4e0d\u540c\u7cfb\u7edf\u4e4b\u95f4\u6765\u56de\u5207\u6362\uff0c\u56fa\u7136\u5bf9\u4ea7\u54c1\u7528\u6237\u4f53\u9a8c\u4e0a\u8f83\u5dee\uff0c\u5e76\u4e14\u589e\u52a0\u7528\u6237\u5bc6\u7801\u7ba1\u7406\u6210\u672c\u3002\u4e5f\u6ca1\u6709\u5f88\u597d\u5730\u5229\u7528\u5185\u90e8\u6d41\u91cf\u8fdb\u884c\u7528\u6237\u6253\u901a\uff0c\u5e76\u4e14\u6bcf\u4e2a\u4ea7\u54c1\u7684\u72ec\u7acb\u4f53\u7cfb\u4f1a\u5bfc\u81f4\u4ea7\u54c1\u5b89\u5168\u5ea6\u4e0b\u964d\u3002<\/p>\n<p>\u56e0\u6b64\u5b9e\u73b0\u96c6\u56e2\u4ea7\u54c1\u7684\u5355\u70b9\u767b\u5f55\u5bf9\u7528\u6237\u4f7f\u7528\u4f53\u9a8c\u4ee5\u53ca\u6548\u7387\u63d0\u5347\u6709\u5f88\u5927\u7684\u5e2e\u52a9\u3002\u90a3\u4e48\u5982\u4f55\u5b9e\u73b0\u7edf\u4e00\u8ba4\u8bc1\u5462\uff1f\u6211\u4eec\u5148\u4e86\u89e3\u4e00\u4e0b\u4f20\u7edf\u7684\u8eab\u4efd\u9a8c\u8bc1\u65b9\u5f0f\u3002<\/p>\n<h2>\u4f20\u7edfSession\u673a\u5236\u53ca\u8eab\u4efd\u8ba4\u8bc1\u65b9\u6848<\/h2>\n<h3>Cookie\u4e0e\u670d\u52a1\u5668\u7684\u4ea4\u4e92<\/h3>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc4JTn\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u4f17\u6240\u5468\u77e5\uff0chttp\u662f\u65e0\u72b6\u6001\u7684\u534f\u8bae\uff0c\u56e0\u6b64\u5ba2\u6237\u6bcf\u6b21\u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95eeweb\u9875\u9762\uff0c\u8bf7\u6c42\u5230\u670d\u52a1\u7aef\u65f6\uff0c\u670d\u52a1\u5668\u90fd\u4f1a\u65b0\u5efa\u7ebf\u7a0b\uff0c\u6253\u5f00\u65b0\u7684\u4f1a\u8bdd\uff0c\u800c\u4e14\u670d\u52a1\u5668\u4e5f\u4e0d\u4f1a\u81ea\u52a8\u7ef4\u62a4\u5ba2\u6237\u7684\u4e0a\u4e0b\u6587\u4fe1\u606f\u3002\u6bd4\u5982\u6211\u4eec\u73b0\u5728\u8981\u5b9e\u73b0\u4e00\u4e2a\u7535\u5546\u5185\u7684\u8d2d\u7269\u8f66\u529f\u80fd\uff0c\u8981\u600e\u4e48\u624d\u80fd\u77e5\u9053\u54ea\u4e9b\u8d2d\u7269\u8f66\u8bf7\u6c42\u5bf9\u5e94\u7684\u662f\u6765\u81ea\u540c\u4e00\u4e2a\u5ba2\u6237\u7684\u8bf7\u6c42\u5462\uff1f<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc4JTo\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u56e0\u6b64\u51fa\u73b0\u4e86session\u8fd9\u4e2a\u6982\u5ff5\uff0csession \u5c31\u662f\u4e00\u79cd\u4fdd\u5b58\u4e0a\u4e0b\u6587\u4fe1\u606f\u7684\u673a\u5236\uff0c\u4ed6\u662f\u9762\u5411\u7528\u6237\u7684\uff0c\u6bcf\u4e00\u4e2aSessionID \u5bf9\u5e94\u7740\u4e00\u4e2a\u7528\u6237\uff0c\u5e76\u4e14\u4fdd\u5b58\u5728\u670d\u52a1\u7aef\u4e2d\u3002session\u4e3b\u8981 \u4ee5 cookie \u6216 URL \u91cd\u5199\u4e3a\u57fa\u7840\u7684\u6765\u5b9e\u73b0\u7684\uff0c\u9ed8\u8ba4\u4f7f\u7528 cookie \u6765\u5b9e\u73b0\uff0c\u7cfb\u7edf\u4f1a\u521b\u9020\u4e00\u4e2a\u540d\u4e3aJSESSIONID\u7684\u53d8\u91cf\u8f93\u51fa\u5230cookie\u4e2d\u3002<\/p>\n<p>JSESSIONID \u662f\u5b58\u50a8\u4e8e\u6d4f\u89c8\u5668\u5185\u5b58\u4e2d\u7684\uff0c\u5e76\u4e0d\u662f\u5199\u5230\u786c\u76d8\u4e0a\u7684\uff0c\u5982\u679c\u6211\u4eec\u628a\u6d4f\u89c8\u5668\u7684cookie \u7981\u6b62\uff0c\u5219 web \u670d\u52a1\u5668\u4f1a\u91c7\u7528 URL \u91cd\u5199\u7684\u65b9\u5f0f\u4f20\u9012 Sessionid\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u5728\u5730\u5740\u680f\u770b\u5230 sessionid=KWJHUG6JJM65HS2K6 \u4e4b\u7c7b\u7684\u5b57\u7b26\u4e32\u3002<\/p>\n<p>\u901a\u5e38 JSESSIONID \u662f\u4e0d\u80fd\u8de8\u7a97\u53e3\u4f7f\u7528\u7684\uff0c\u5f53\u4f60\u65b0\u5f00\u4e86\u4e00\u4e2a\u6d4f\u89c8\u5668\u7a97\u53e3\u8fdb\u5165\u76f8\u540c\u9875\u9762\u65f6\uff0c\u7cfb\u7edf\u4f1a\u8d4b\u4e88\u4f60\u4e00\u4e2a\u65b0\u7684sessionid\uff0c\u8fd9\u6837\u6211\u4eec\u4fe1\u606f\u5171\u4eab\u7684\u76ee\u7684\u5c31\u8fbe\u4e0d\u5230\u4e86\u3002<\/p>\n<h3>\u670d\u52a1\u5668\u7aef\u7684session\u7684\u673a\u5236<\/h3>\n<p>\u5f53\u670d\u52a1\u7aef\u6536\u5230\u5ba2\u6237\u7aef\u7684\u8bf7\u6c42\u65f6\u5019\uff0c\u9996\u5148\u5224\u65ad\u8bf7\u6c42\u91cc\u662f\u5426\u5305\u542b\u4e86JSESSIONID\u7684sessionId\uff0c\u5982\u679c\u5b58\u5728\u8bf4\u660e\u5df2\u7ecf\u521b\u5efa\u8fc7\u4e86\uff0c\u76f4\u63a5\u4ece\u5185\u5b58\u4e2d\u62ff\u51fa\u6765\u4f7f\u7528\uff0c\u5982\u679c\u67e5\u8be2\u4e0d\u5230\uff0c\u8bf4\u660e\u662f\u65e0\u6548\u7684\u3002<\/p>\n<p>\u5982\u679c\u5ba2\u6237\u8bf7\u6c42\u4e0d\u5305\u542bsessionid\uff0c\u5219\u4e3a\u6b64\u5ba2\u6237\u521b\u5efa\u4e00\u4e2asession\u5e76\u4e14\u751f\u6210\u4e00\u4e2a\u4e0e\u6b64session\u76f8\u5173\u8054\u7684sessionid\uff0c\u8fd9\u4e2asessionid\u5c06\u5728\u672c\u6b21\u54cd\u5e94\u4e2d\u8fd4\u56de\u7ed9\u5ba2\u6237\u7aef\u4fdd\u5b58\u3002<\/p>\n<p>\u5bf9\u6bcf\u6b21http\u8bf7\u6c42\uff0c\u90fd\u7ecf\u5386\u4ee5\u4e0b\u6b65\u9aa4\u5904\u7406\uff1a<\/p>\n<ul>\n<li>\u670d\u52a1\u7aef\u9996\u5148\u67e5\u627e\u5bf9\u5e94\u7684cookie\u7684\u503c\uff08sessionid\uff09\u3002<\/li>\n<li>\u6839\u636esessionid\uff0c\u4ece\u670d\u52a1\u5668\u7aefsession\u5b58\u50a8\u4e2d\u83b7\u53d6\u5bf9\u5e94id\u7684session\u6570\u636e\uff0c\u8fdb\u884c\u8fd4\u56de\u3002<\/li>\n<li>\u5982\u679c\u627e\u4e0d\u5230sessionid\uff0c\u670d\u52a1\u5668\u7aef\u5c31\u521b\u5efasession\uff0c\u751f\u6210sessionid\u5bf9\u5e94\u7684cookie\uff0c\u5199\u5165\u5230\u54cd\u5e94\u5934\u4e2d\u3002<\/li>\n<\/ul>\n<p>session\u662f\u7531\u670d\u52a1\u7aef\u751f\u6210\u7684\uff0c\u5e76\u4e14\u4ee5\u6563\u5217\u8868\u7684\u5f62\u5f0f\u4fdd\u5b58\u5728\u5185\u5b58\u4e2d<\/p>\n<h3>\u57fa\u4e8e session \u7684\u8eab\u4efd\u8ba4\u8bc1\u6d41\u7a0b<\/h3>\n<p>\u57fa\u4e8eseesion\u7684\u8eab\u4efd\u8ba4\u8bc1\u4e3b\u8981\u6d41\u7a0b\u5982\u4e0b\uff1a<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc4JTp\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u56e0\u4e3a http \u8bf7\u6c42\u662f\u65e0\u72b6\u6001\u8bf7\u6c42\uff0c\u6240\u4ee5\u5728 Web \u9886\u57df\uff0c\u5927\u90e8\u5206\u90fd\u662f\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\u89e3\u51b3\u3002\u4f46\u662f\u8fd9\u4e48\u505a\u6709\u4ec0\u4e48\u95ee\u9898\u5462\uff1f\u6211\u4eec\u63a5\u7740\u770b<\/p>\n<h2>\u96c6\u7fa4\u73af\u5883\u4e0b\u7684 Session \u56f0\u5883\u53ca\u89e3\u51b3\u65b9\u6848<\/h2>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc4JTq\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u968f\u7740\u6280\u672f\u7684\u53d1\u5c55\uff0c\u7528\u6237\u6d41\u91cf\u589e\u5927\uff0c\u5355\u4e2a\u670d\u52a1\u5668\u5df2\u7ecf\u4e0d\u80fd\u6ee1\u8db3\u7cfb\u7edf\u7684\u9700\u8981\u4e86\uff0c\u5206\u5e03\u5f0f\u67b6\u6784\u5f00\u59cb\u6d41\u884c\u3002\u901a\u5e38\u90fd\u4f1a\u628a\u7cfb\u7edf\u90e8\u7f72\u5728\u591a\u53f0\u670d\u52a1\u5668\u4e0a\uff0c\u901a\u8fc7\u8d1f\u8f7d\u5747\u8861\u628a\u8bf7\u6c42\u5206\u53d1\u5230\u5176\u4e2d\u7684\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\uff0c\u8fd9\u6837\u5f88\u53ef\u80fd\u540c\u4e00\u4e2a\u7528\u6237\u7684\u8bf7\u6c42\u88ab\u5206\u53d1\u5230\u4e0d\u540c\u7684\u670d\u52a1\u5668\u4e0a\uff0c\u56e0\u4e3a session \u662f\u4fdd\u5b58\u5728\u670d\u52a1\u5668\u4e0a\u7684\uff0c\u90a3\u4e48\u5f88\u6709\u53ef\u80fd\u7b2c\u4e00\u6b21\u8bf7\u6c42\u8bbf\u95ee\u7684 A \u670d\u52a1\u5668\uff0c\u521b\u5efa\u4e86 session\uff0c\u4f46\u662f\u7b2c\u4e8c\u6b21\u8bbf\u95ee\u5230\u4e86 B \u670d\u52a1\u5668\uff0c\u8fd9\u65f6\u5c31\u4f1a\u51fa\u73b0\u53d6\u4e0d\u5230 session \u7684\u60c5\u51b5\u3002<\/p>\n<p>\u6211\u4eec\u77e5\u9053\uff0cSession \u4e00\u822c\u662f\u7528\u6765\u5b58\u4f1a\u8bdd\u5168\u5c40\u7684\u7528\u6237\u4fe1\u606f\uff08\u4e0d\u4ec5\u4ec5\u662f\u767b\u9646\u65b9\u9762\u7684\u95ee\u9898\uff09\uff0c\u7528\u6765\u7b80\u5316\/\u52a0\u901f\u540e\u7eed\u7684\u4e1a\u52a1\u8bf7\u6c42\u3002<br \/>\u4f20\u7edf\u7684 session \u7531\u670d\u52a1\u5668\u7aef\u751f\u6210\u5e76\u5b58\u50a8\uff0c\u5f53\u5e94\u7528\u8fdb\u884c\u5206\u5e03\u5f0f\u96c6\u7fa4\u90e8\u7f72\u7684\u65f6\u5019\uff0c\u5982\u4f55\u4fdd\u8bc1\u4e0d\u540c\u670d\u52a1\u5668\u4e0a session \u4fe1\u606f\u80fd\u591f\u5171\u4eab\u5462\uff1f<\/p>\n<h3>Session\u5171\u4eab\u65b9\u6848<\/h3>\n<p>Session\u5171\u4eab\u4e00\u822c\u6709\u4e24\u79cd\u601d\u8def<\/p>\n<ul>\n<li>session\u590d\u5236<\/li>\n<li>session\u96c6\u4e2d\u5b58\u50a8<\/li>\n<\/ul>\n<h3>session\u590d\u5236<\/h3>\n<p>session\u590d\u5236\u5373\u5c06\u4e0d\u540c\u670d\u52a1\u5668\u4e0a session \u6570\u636e\u8fdb\u884c\u590d\u5236\uff0c\u7528\u6237\u767b\u5f55\uff0c\u4fee\u6539\uff0c\u6ce8\u9500\u65f6\uff0c\u5c06session\u4fe1\u606f\u540c\u65f6\u4e5f\u590d\u5236\u5230\u5176\u4ed6\u673a\u5668\u4e0a\u9762\u53bb\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc4JTr\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u8fd9\u79cd\u5b9e\u73b0\u7684\u95ee\u9898\u5c31\u662f\u5b9e\u73b0\u6210\u672c\u9ad8\uff0c\u7ef4\u62a4\u96be\u5ea6\u5927\uff0c\u5e76\u4e14\u4f1a\u5b58\u5728\u5ef6\u8fdf\u767b\u95ee\u9898\u3002<\/p>\n<h3>session\u96c6\u4e2d\u5b58\u50a8<\/h3>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc4JTs\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u96c6\u4e2d\u5b58\u50a8\u5c31\u662f\u5c06\u83b7\u53d6session\u5355\u72ec\u653e\u5728\u4e00\u4e2a\u670d\u52a1\u4e2d\u8fdb\u884c\u5b58\u50a8\uff0c\u6240\u6709\u83b7\u53d6session\u7684\u7edf\u4e00\u6765\u8fd9\u4e2a\u670d\u52a1\u4e2d\u53bb\u53d6\u3002\u8fd9\u6837\u5c31\u907f\u514d\u4e86\u540c\u6b65\u548c\u7ef4\u62a4\u591a\u5957session\u7684\u95ee\u9898\u3002\u4e00\u822c\u6211\u4eec\u90fd\u662f\u4f7f\u7528redis\u8fdb\u884c\u96c6\u4e2d\u5f0f\u5b58\u50a8session\u3002<\/p>\n<h2>\u591a\u670d\u52a1\u4e0b\u7684\u767b\u9646\u56f0\u5883\u53caSSO\u65b9\u6848<\/h2>\n<h3>SSO\u7684\u4ea7\u751f\u80cc\u666f<\/h3>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc4JTt\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u5982\u679c\u4f01\u4e1a\u505a\u5927\u4e86\u4e4b\u540e\uff0c\u4e00\u822c\u90fd\u6709\u5f88\u591a\u7684\u4e1a\u52a1\u652f\u6301\u7cfb\u7edf\u4e3a\u5176\u63d0\u4f9b\u76f8\u5e94\u7684\u7ba1\u7406\u548c IT \u670d\u52a1\uff0c\u6309\u7167\u4f20\u7edf\u7684\u9a8c\u8bc1\u65b9\u5f0f\u8bbf\u95ee\u591a\u7cfb\u7edf\uff0c\u6bcf\u4e2a\u5355\u72ec\u7684\u7cfb\u7edf\u90fd\u4f1a\u6709\u81ea\u5df1\u7684\u5b89\u5168\u4f53\u7cfb\u548c\u8eab\u4efd\u8ba4\u8bc1\u7cfb\u7edf\u3002\u8fdb\u5165\u6bcf\u4e2a\u7cfb\u7edf\u90fd\u9700\u8981\u8fdb\u884c\u767b\u5f55\uff0c\u83b7\u53d6session\uff0c\u518d\u901a\u8fc7session\u8bbf\u95ee\u5bf9\u5e94\u7cfb\u7edf\u8d44\u6e90\u3002\u8fd9\u6837\u7684\u5c40\u9762\u4e0d\u4ec5\u7ed9\u7ba1\u7406\u4e0a\u5e26\u6765\u4e86\u5f88\u5927\u7684\u56f0\u96be\uff0c\u5bf9\u5ba2\u6237\u6765\u8bf4\u4e5f\u6781\u4e0d\u53cb\u597d\uff0c\u90a3\u4e48\u5982\u4f55\u8ba9\u5ba2\u6237\u53ea\u9700\u767b\u9646\u4e00\u6b21\uff0c\u5c31\u53ef\u4ee5\u8fdb\u5165\u591a\u4e2a\u7cfb\u7edf\uff0c\u800c\u4e0d\u9700\u8981\u91cd\u65b0\u767b\u5f55\u5462\uff1f<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc4JTu\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u201c\u5355\u70b9\u767b\u5f55\u201d\u5c31\u662f\u4e13\u4e3a\u89e3\u51b3\u6b64\u7c7b\u95ee\u9898\u7684\u3002\u5176\u5927\u81f4\u601d\u60f3\u6d41\u7a0b\u5982\u4e0b\uff1a\u901a\u8fc7\u4e00\u4e2a ticket \u8fdb\u884c\u4e32\u63a5\u5404\u7cfb\u7edf\u95f4\u7684\u7528\u6237\u4fe1\u606f\u3002<\/p>\n<h2>SSO\u7684\u5e95\u5c42\u539f\u7406 CAS<\/h2>\n<h3>CAS\u5b9e\u73b0\u5355\u70b9\u767b\u5f55\u6d41\u7a0b<\/h3>\n<p>\u6211\u4eec\u77e5\u9053\u5bf9\u4e8e\u5b8c\u5168\u4e0d\u540c\u57df\u540d\u7684\u7cfb\u7edf\uff0ccookie \u662f\u65e0\u6cd5\u8de8\u57df\u540d\u5171\u4eab\u7684\uff0c\u56e0\u6b64 sessionId \u5728\u9875\u9762\u7aef\u4e5f\u65e0\u6cd5\u5171\u4eab\uff0c\u56e0\u6b64\u9700\u8981\u5b9e\u73b0\u5355\u5e97\u767b\u5f55\uff0c\u5c31\u9700\u8981\u542f\u7528\u4e00\u4e2a\u4e13\u95e8\u7528\u6765\u767b\u5f55\u7684\u57df\u540d\u5982\uff08ouath.com\uff09\u6765\u63d0\u4f9b\u6240\u6709\u7cfb\u7edf\u7684sessionId\u3002<\/p>\n<p>\u53e6\u5916\uff0c\u6700\u8fd1\u9762\u8bd5\u6574\u7406\u4e86 Java \u6700\u65b0\u3001\u6700\u5168\u7684\u9762\u8bd5\u9898\uff1a<\/p>\n<blockquote><p><a href=\"https:\/\/link.segmentfault.com\/?enc=HDqhXBDVe5oezgVk4YJvpw%3D%3D.04c1FALr1beTHfAR0xaxFtdituhzcm6zAzx30mrkJas%3D\" rel=\"nofollow\">https:\/\/www.javastack.cn\/mst\/<\/a><\/p><\/blockquote>\n<p>\u5f53\u4e1a\u52a1\u7cfb\u7edf\u88ab\u6253\u5f00\u65f6\uff0c\u501f\u52a9\u4e2d\u5fc3\u6388\u6743\u7cfb\u7edf\u8fdb\u884c\u767b\u5f55\uff0c\u6574\u4f53\u6d41\u7a0b\u5982\u4e0b\uff1a<\/p>\n<ol>\n<li>\u5f53b.com\u6253\u5f00\u65f6\uff0c\u53d1\u73b0\u81ea\u5df1\u672a\u767b\u9646\uff0c\u4e8e\u662f\u8df3\u8f6c\u5230ouath.com\u53bb\u767b\u9646<\/li>\n<li>ouath.com\u767b\u9646\u9875\u9762\u88ab\u6253\u5f00\uff0c\u7528\u6237\u8f93\u5165\u5e10\u6237\/\u5bc6\u7801\u767b\u9646\u6210\u529f<\/li>\n<li>ouath.com\u767b\u9646\u6210\u529f\uff0c\u79cd cookie \u5230ouath.com\u57df\u540d\u4e0b<\/li>\n<li>\u628a sessionid \u653e\u5165\u540e\u53f0redis\uff0c\u5b58\u653e&lt;ticket\uff0csesssionid&gt;\u6570\u636e\u7ed3\u6784\uff0c\u7136\u540e\u9875\u9762\u91cd\u5b9a\u5411\u5230A\u7cfb\u7edf<\/li>\n<li>\u5f53b.com\u91cd\u65b0\u88ab\u6253\u5f00\uff0c\u53d1\u73b0\u4ecd\u7136\u662f\u672a\u767b\u9646\uff0c\u4f46\u662f\u6709\u4e86\u4e00\u4e2a ticket\u503c<\/li>\n<li>\u5f53b.com\u7528ticket \u503c\uff0c\u5230 redis \u91cc\u67e5\u5230 sessionid\uff0c\u5e76\u505a session \u540c\u6b65\uff0c\u7136\u540e\u79cdcookie\u7ed9\u81ea\u5df1\uff0c\u9875\u9762\u539f\u5730\u91cd\u5b9a\u5411<\/li>\n<li>\u5f53b.com\u6253\u5f00\u81ea\u5df1\u9875\u9762\uff0c\u6b64\u65f6\u6709\u4e86 cookie\uff0c\u540e\u53f0\u6821\u9a8c\u767b\u9646\u72b6\u6001\uff0c\u6210\u529f<\/li>\n<\/ol>\n<p>\u6574\u4e2a\u4ea4\u4e92\u6d41\u7a0b\u56fe\u5982\u4e0b\uff1a<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc4JTv\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<h2>\u5355\u70b9\u767b\u5f55\u6d41\u7a0b\u6f14\u793a<\/h2>\n<h3>CAS\u767b\u5f55\u670d\u52a1demo\u6838\u5fc3\u4ee3\u7801<\/h3>\n<p>\u7528\u6237\u5b9e\u4f53\u7c7b<\/p>\n<pre><code>public class UserForm implements Serializable{\n  private static final long serialVersionUID = 1L;\n\n  private String username;\n  private String password;\n  private String backurl;\n\n  public String getUsername() {\n      return username;\n  }\n\n  public void setUsername(String username) {\n      this.username = username;\n  }\n\n  public String getPassword() {\n      return password;\n  }\n\n  public void setPassword(String password) {\n      this.password = password;\n  }\n\n  public String getBackurl() {\n      return backurl;\n  }\n\n  public void setBackurl(String backurl) {\n      this.backurl = backurl;\n  }\n}<\/code><\/pre>\n<p>\u767b\u5f55\u63a7\u5236\u5668<\/p>\n<pre><code>@Controller\npublic class IndexController {\n    @Autowired\n    private RedisTemplate redisTemplate;\n\n  @GetMapping(&quot;\/toLogin&quot;)\n  public String toLogin(Model model,HttpServletRequest request) {\n      Object userInfo = request.getSession().getAttribute(LoginFilter.USER_INFO);\n      \/\/\u4e0d\u4e3a\u7a7a\uff0c\u5219\u662f\u5df2\u767b\u9646\u72b6\u6001\n      if (null != userInfo){\n          String ticket = UUID.randomUUID().toString();\n          redisTemplate.opsForValue().set(ticket,userInfo,2, TimeUnit.SECONDS);\n          return &quot;redirect:&quot;+request.getParameter(&quot;url&quot;)+&quot;?ticket=&quot;+ticket;\n      }\n      UserForm user = new UserForm();\n      user.setUsername(&quot;laowang&quot;);\n      user.setPassword(&quot;laowang&quot;);\n      user.setBackurl(request.getParameter(&quot;url&quot;));\n      model.addAttribute(&quot;user&quot;, user);\n\n      return &quot;login&quot;;\n  }\n\n  @PostMapping(&quot;\/login&quot;)\n  public void login(@ModelAttribute UserForm user,HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException {\n      System.out.println(&quot;backurl:&quot;+user.getBackurl());\n      request.getSession().setAttribute(LoginFilter.USER_INFO,user);\n\n      \/\/\u767b\u9646\u6210\u529f\uff0c\u521b\u5efa\u7528\u6237\u4fe1\u606f\u7968\u636e\n      String ticket = UUID.randomUUID().toString();\n      redisTemplate.opsForValue().set(ticket,user,20, TimeUnit.SECONDS);\n      \/\/\u91cd\u5b9a\u5411\uff0c\u56de\u539furl  ---a.com\n      if (null == user.getBackurl() || user.getBackurl().length()==0){\n          response.sendRedirect(&quot;\/index&quot;);\n      } else {\n          response.sendRedirect(user.getBackurl()+&quot;?ticket=&quot;+ticket);\n      }\n  }\n\n  @GetMapping(&quot;\/index&quot;)\n  public ModelAndView index(HttpServletRequest request) {\n      ModelAndView modelAndView = new ModelAndView();\n      Object user = request.getSession().getAttribute(LoginFilter.USER_INFO);\n      UserForm userInfo = (UserForm) user;\n      modelAndView.setViewName(&quot;index&quot;);\n      modelAndView.addObject(&quot;user&quot;, userInfo);\n      request.getSession().setAttribute(&quot;test&quot;,&quot;123&quot;);\n      return modelAndView;\n  }\n}<\/code><\/pre>\n<p>\u767b\u5f55\u8fc7\u6ee4\u5668<\/p>\n<pre><code>public class LoginFilter implements Filter {\n    public static final String USER_INFO = &quot;user&quot;;\n    @Override\n    public void init(FilterConfig filterConfig) throws ServletException {}\n\n  @Override\n  public void doFilter(ServletRequest servletRequest,\n                       ServletResponse servletResponse, FilterChain filterChain)\n          throws IOException, ServletException {\n\n      HttpServletRequest request = (HttpServletRequest) servletRequest;\n       HttpServletResponse response = (HttpServletResponse)servletResponse;\n\n      Object userInfo = request.getSession().getAttribute(USER_INFO);;\n\n      \/\/\u5982\u679c\u672a\u767b\u9646\uff0c\u5219\u62d2\u7edd\u8bf7\u6c42\uff0c\u8f6c\u5411\u767b\u9646\u9875\u9762\n      String requestUrl = request.getServletPath();\n      if (!&quot;\/toLogin&quot;.equals(requestUrl)\/\/\u4e0d\u662f\u767b\u9646\u9875\u9762\n              &amp;amp;&amp;amp; !requestUrl.startsWith(&quot;\/login&quot;)\/\/\u4e0d\u662f\u53bb\u767b\u9646\n              &amp;amp;&amp;amp; null == userInfo) {\/\/\u4e0d\u662f\u767b\u9646\u72b6\u6001\n\n          request.getRequestDispatcher(&quot;\/toLogin&quot;).forward(request,response);\n          return ;\n      }\n\n      filterChain.doFilter(request,servletResponse);\n  }\n\n  @Override\n  public void destroy() {\n\n  }\n}<\/code><\/pre>\n<p>\u914d\u7f6e\u8fc7\u6ee4\u5668<\/p>\n<pre><code>@Configuration\npublic class LoginConfig {\n\n\/\/\u914d\u7f6efilter\u751f\u6548\n@Bean\npublic FilterRegistrationBean sessionFilterRegistration() {\n\n    FilterRegistrationBean registration = new FilterRegistrationBean();\n    registration.setFilter(new LoginFilter());\n    registration.addUrlPatterns(&quot;\/*&quot;);\n    registration.addInitParameter(&quot;paramName&quot;, &quot;paramValue&quot;);\n    registration.setName(&quot;sessionFilter&quot;);\n    registration.setOrder(1);\n    return registration;\n}\n}<\/code><\/pre>\n<p>\u767b\u5f55\u9875\u9762<\/p>\n<pre><code>&lt;!DOCTYPE HTML&gt;\n&lt;html xmlns:th=&quot;http:\/\/www.thymeleaf.org&quot;&gt;\n&lt;head&gt;\n    &lt;title&gt;enjoy login&lt;\/title&gt;\n    &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text\/html; charset=UTF-8&quot; \/&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n&lt;div text-align=&quot;center&quot;&gt;\n    &lt;h1&gt;\u8bf7\u767b\u9646&lt;\/h1&gt;\n    &lt;form action=&quot;#&quot; th:action=&quot;@{\/login}&quot; th:object=&quot;${user}&quot; method=&quot;post&quot;&gt;\n        &lt;p&gt;\u7528\u6237\u540d: &lt;input type=&quot;text&quot; th:field=&quot;*{username}&quot; \/&gt;&lt;\/p&gt;\n        &lt;p&gt;\u5bc6  \u7801: &lt;input type=&quot;text&quot; th:field=&quot;*{password}&quot; \/&gt;&lt;\/p&gt;\n        &lt;p&gt;&lt;input type=&quot;submit&quot; value=&quot;Submit&quot; \/&gt; &lt;input type=&quot;reset&quot; value=&quot;Reset&quot; \/&gt;&lt;\/p&gt;\n        &lt;input type=&quot;text&quot; th:field=&quot;*{backurl}&quot; hidden=&quot;hidden&quot; \/&gt;\n    &lt;\/form&gt;\n&lt;\/div&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n<p>\u63a8\u8350\u4e00\u4e2a\u5f00\u6e90\u514d\u8d39\u7684 Spring Boot \u6700\u5168\u6559\u7a0b\uff1a<\/p>\n<blockquote><p><a href=\"https:\/\/link.segmentfault.com\/?enc=mrjSV09XgS%2B4YUxzylusaA%3D%3D.PFQoNCLOyuFgKylNxEs7aHmsaug32dSuixvn0VGDZWoGnhRczQ9zPlYFWYilslzxbzoVPwBpTGk%2BqUbm7ihPsQ%3D%3D\" rel=\"nofollow\">https:\/\/github.com\/javastacks\/spring-boot-best-practice<\/a><\/p><\/blockquote>\n<h3>web\u7cfb\u7edfdemo\u6838\u5fc3\u4ee3\u7801<\/h3>\n<p>\u8fc7\u6ee4\u5668<\/p>\n<pre><code>public class SSOFilter implements Filter {\n    private RedisTemplate redisTemplate;\n\n    public static final String USER_INFO = &quot;user&quot;;\n\n    public SSOFilter(RedisTemplate redisTemplate){\n        this.redisTemplate = redisTemplate;\n    }\n    @Override\n    public void init(FilterConfig filterConfig) throws ServletException {\n\n    }\n\n    @Override\n    public void doFilter(ServletRequest servletRequest,\n                         ServletResponse servletResponse, FilterChain filterChain)\n            throws IOException, ServletException {\n\n        HttpServletRequest request = (HttpServletRequest) servletRequest;\n        HttpServletResponse response = (HttpServletResponse)servletResponse;\n\n        Object userInfo = request.getSession().getAttribute(USER_INFO);;\n\n        \/\/\u5982\u679c\u672a\u767b\u9646\uff0c\u5219\u62d2\u7edd\u8bf7\u6c42\uff0c\u8f6c\u5411\u767b\u9646\u9875\u9762\n        String requestUrl = request.getServletPath();\n        if (!&quot;\/toLogin&quot;.equals(requestUrl)\/\/\u4e0d\u662f\u767b\u9646\u9875\u9762\n                &amp;amp;&amp;amp; !requestUrl.startsWith(&quot;\/login&quot;)\/\/\u4e0d\u662f\u53bb\u767b\u9646\n                &amp;amp;&amp;amp; null == userInfo) {\/\/\u4e0d\u662f\u767b\u9646\u72b6\u6001\n\n            String ticket = request.getParameter(&quot;ticket&quot;);\n            \/\/\u6709\u7968\u636e,\u5219\u4f7f\u7528\u7968\u636e\u53bb\u5c1d\u8bd5\u62ff\u53d6\u7528\u6237\u4fe1\u606f\n            if (null != ticket){\n                userInfo = redisTemplate.opsForValue().get(ticket);\n            }\n            \/\/\u65e0\u6cd5\u5f97\u5230\u7528\u6237\u4fe1\u606f\uff0c\u5219\u53bb\u767b\u9646\u9875\u9762\n            if (null == userInfo){\n                response.sendRedirect(&quot;http:\/\/127.0.0.1:8080\/toLogin?url=&quot;+request.getRequestURL().toString());\n                return ;\n            }\n\n            \/**\n             * \u5c06\u7528\u6237\u4fe1\u606f\uff0c\u52a0\u8f7d\u8fdbsession\u4e2d\n             *\/\n            UserForm user = (UserForm) userInfo;\n            request.getSession().setAttribute(SSOFilter.USER_INFO,user);\n            redisTemplate.delete(ticket);\n        }\n\n        filterChain.doFilter(request,servletResponse);\n    }\n\n    @Override\n    public void destroy() {\n\n    }\n}<\/code><\/pre>\n<p>\u63a7\u5236\u5668<\/p>\n<pre><code>@Controller\npublic class IndexController {\n    @Autowired\n    private RedisTemplate redisTemplate;\n\n    @GetMapping(&quot;\/index&quot;)\n    public ModelAndView index(HttpServletRequest request) {\n        ModelAndView modelAndView = new ModelAndView();\n        Object userInfo = request.getSession().getAttribute(SSOFilter.USER_INFO);\n        UserForm user = (UserForm) userInfo;\n        modelAndView.setViewName(&quot;index&quot;);\n        modelAndView.addObject(&quot;user&quot;, user);\n\n        request.getSession().setAttribute(&quot;test&quot;,&quot;123&quot;);\n        return modelAndView;\n    }\n}<\/code><\/pre>\n<p>\u9996\u9875<\/p>\n<pre><code>&lt;!DOCTYPE HTML&gt;\n&lt;html xmlns:th=&quot;http:\/\/www.thymeleaf.org&quot;&gt;\n&lt;head&gt;\n    &lt;title&gt;enjoy index&lt;\/title&gt;\n    &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text\/html; charset=UTF-8&quot; \/&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n&lt;div th:object=&quot;${user}&quot;&gt;\n    &lt;h1&gt;cas-website\uff1a\u6b22\u8fce\u4f60&quot;&gt;&lt;\/h1&gt;\n&lt;\/div&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n<h3>CAS\u7684\u5355\u70b9\u767b\u5f55\u548cOAuth2\u7684\u533a\u522b<\/h3>\n<ul>\n<li>OAuth2: \u4e09\u65b9\u6388\u6743\u534f\u8bae\uff0c\u5141\u8bb8\u7528\u6237\u5728\u4e0d\u63d0\u4f9b\u8d26\u53f7\u5bc6\u7801\u7684\u60c5\u51b5\u4e0b\uff0c\u901a\u8fc7\u4fe1\u4efb\u7684\u5e94\u7528\u8fdb\u884c\u6388\u6743\uff0c\u4f7f\u5176\u5ba2\u6237\u7aef\u53ef\u4ee5\u8bbf\u95ee\u6743\u9650\u8303\u56f4\u5185\u7684\u8d44\u6e90\u3002<\/li>\n<li>CAS: \u4e2d\u592e\u8ba4\u8bc1\u670d\u52a1\uff08Central Authentication Service\uff09\uff0c\u4e00\u4e2a\u57fa\u4e8eKerberos\u7968\u636e\u65b9\u5f0f\u5b9e\u73b0SSO\u5355\u70b9\u767b\u5f55\u7684\u6846\u67b6\uff0c\u4e3aWeb \u5e94\u7528\u7cfb\u7edf\u63d0\u4f9b\u4e00\u79cd\u53ef\u9760\u7684\u5355\u70b9\u767b\u5f55\u89e3\u51b3\u65b9\u6cd5\uff08\u5c5e\u4e8e Web SSO \uff09\u3002<\/li>\n<\/ul>\n<ol>\n<li>CAS\u7684\u5355\u70b9\u767b\u5f55\u65f6\u4fdd\u969c\u5ba2\u6237\u7aef\u7684\u7528\u6237\u8d44\u6e90\u7684\u5b89\u5168 \uff1bOAuth2\u5219\u662f\u4fdd\u969c\u670d\u52a1\u7aef\u7684\u7528\u6237\u8d44\u6e90\u7684\u5b89\u5168 \u3002<\/li>\n<li>CAS\u5ba2\u6237\u7aef\u8981\u83b7\u53d6\u7684\u6700\u7ec8\u4fe1\u606f\u662f\uff0c\u8fd9\u4e2a\u7528\u6237\u5230\u5e95\u6709\u6ca1\u6709\u6743\u9650\u8bbf\u95ee\u6211\uff08CAS\u5ba2\u6237\u7aef\uff09\u7684\u8d44\u6e90\uff1bOAuth2\u83b7\u53d6\u7684\u6700\u7ec8\u4fe1\u606f\u662f\uff0c\u6211\uff08oauth2\u670d\u52a1\u63d0\u4f9b\u65b9\uff09\u7684\u7528\u6237\u7684\u8d44\u6e90\u5230\u5e95\u80fd\u4e0d\u80fd\u8ba9\u4f60\uff08oauth2\u7684\u5ba2\u6237\u7aef\uff09\u8bbf\u95ee\u3002<\/li>\n<\/ol>\n<p>\u56e0\u6b64\uff0c\u9700\u8981\u7edf\u4e00\u7684\u8d26\u53f7\u5bc6\u7801\u8fdb\u884c\u8eab\u4efd\u8ba4\u8bc1\uff0c\u7528CAS\uff1b\u9700\u8981\u6388\u6743\u7b2c\u4e09\u65b9\u670d\u52a1\u4f7f\u7528\u6211\u65b9\u8d44\u6e90\uff0c\u4f7f\u7528OAuth2\u3002<\/p>\n<p>\u5173\u4e8e OAuth2\u3001JWT \u7684\u6700\u65b0\u5e94\u7528\uff0c\u53ef\u4ee5\u62a5\u540d\u6808\u957f\u7684\u300a<a href=\"https:\/\/link.segmentfault.com\/?enc=XFHJ7LC6BYjsM63T5e9R0w%3D%3D.FvhOK79Sy2dyiTR0LvjwHlhyjbl0bpUaQAHGX3ZEYhEctrRdi%2F6n6q1uFpXSCvarxHjjSReJ4yz7gPlXx6AMWA%3D%3D\" rel=\"nofollow\">Spring Cloud \u5fae\u670d\u52a1\u5b9e\u6218\u8bfe<\/a>\u300b\uff0c\u4e00\u6b21\u8ba2\u9605\uff0c\u6c38\u4e45\u514d\u8d39\u5b66\u4e60\u3002<\/p>\n<p><strong>\u8fd1\u671f\u70ed\u6587\u63a8\u8350\uff1a<\/strong><\/p>\n<p>1.<a href=\"https:\/\/link.segmentfault.com\/?enc=GLU0T1XwU8wnNd00C4IEcw%3D%3D.1hHIh7C4UWpfk4kJ2RjX%2FK5Emys%2Fw41DYpX2swhWAmA%3D\" rel=\"nofollow\">1,000+ \u9053 Java\u9762\u8bd5\u9898\u53ca\u7b54\u6848\u6574\u7406(2022\u6700\u65b0\u7248)<\/a><\/p>\n<p>2.<a href=\"https:\/\/link.segmentfault.com\/?enc=BVMnhH%2F4kgKGsNlGRf8%2FIQ%3D%3D.HON6DZGmQZMpijQ1W9jX05TRtFDfbaXLigZNyQX0RyQojjXBC4wOBDjVJxu%2BEKdK%2B1s3GglU90GO1QHzbMorLQ%3D%3D\" rel=\"nofollow\">\u52b2\u7206\uff01Java \u534f\u7a0b\u8981\u6765\u4e86\u3002\u3002\u3002<\/a><\/p>\n<p>3.<a href=\"https:\/\/link.segmentfault.com\/?enc=AwoWYYL0OO3qMt8Nl7F7BQ%3D%3D.NRMbeRJUML1XyqNiL0f4BMeX1rWrW45u%2Fe%2BQXhml8V2qL5x5K6%2Bt4hhYR%2BcaVXgL\" rel=\"nofollow\">Spring Boot 2.x \u6559\u7a0b\uff0c\u592a\u5168\u4e86\uff01<\/a><\/p>\n<p>4.<a href=\"https:\/\/link.segmentfault.com\/?enc=H1BipH%2F3PByCFEMCbkr09w%3D%3D.euZt9hCqU9bv5YvbGyYyPLuymezLIyuGp1192v%2FFlsW1ktGkDiLSD261U6VdXVn4exfHB2wuqZpeTRtBEigLHQ%3D%3D\" rel=\"nofollow\">\u522b\u518d\u5199\u6ee1\u5c4f\u7684\u7206\u7206\u7206\u70b8\u7c7b\u4e86\uff0c\u8bd5\u8bd5\u88c5\u9970\u5668\u6a21\u5f0f\uff0c\u8fd9\u624d\u662f\u4f18\u96c5\u7684\u65b9\u5f0f\uff01\uff01<\/a><\/p>\n<p>5.<a href=\"https:\/\/link.segmentfault.com\/?enc=MaVyzNqVKdpmur1nm0py5Q%3D%3D.BfjhodmB%2BSrETjsvUKiJjglqc706C4CjGThsMxxQ5lrmFFKkXlLP5CsdCzByqnjwY%2FBRiRdBvzQDpVszM88%2BMmRCBE0wAtEJ%2FiEUA25tefo%3D\" rel=\"nofollow\">\u300aJava\u5f00\u53d1\u624b\u518c\uff08\u5d69\u5c71\u7248\uff09\u300b\u6700\u65b0\u53d1\u5e03\uff0c\u901f\u901f\u4e0b\u8f7d\uff01<\/a><\/p>\n<p>\u89c9\u5f97\u4e0d\u9519\uff0c\u522b\u5fd8\u4e86\u968f\u624b\u70b9\u8d5e+\u8f6c\u53d1\u54e6\uff01<\/p>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000043036392\">https:\/\/segmentfault.com\/a\/1190000043036392<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f5c\u8005\uff1a\u738b\u8001\u72ee \/\u6765\u6e90\uff1ajuejin.cn\/post\/7123787027652280356 \u6700\u8fd1\u5f00\u53d1\u65b0\u4ea7\u54c1\uff0c\u7136 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-10006967","post","type-post","status-publish","format-standard","hentry","category-share"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006967","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10006967"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006967\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10006967"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10006967"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10006967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}