{"id":300009,"date":"2021-01-17T19:59:43","date_gmt":"2021-01-17T11:59:43","guid":{"rendered":"http:\/\/4563.org\/?p=300009"},"modified":"2021-01-17T19:59:43","modified_gmt":"2021-01-17T11:59:43","slug":"jwt-claims-%e8%af%a5%e5%a6%82%e4%bd%95%e7%bf%bb%e8%af%91","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=300009","title":{"rendered":"JWT Claims \u8be5\u5982\u4f55\u7ffb\u8bd1"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  JWT Claims \u8be5\u5982\u4f55\u7ffb\u8bd1               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : bigbyto <\/span>  <span><i><\/i> 5<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u770b RFC \u4e2d\u5bf9\u5b83\u7684\u63cf\u8ff0\u4f3c\u4e4e\u662f\u7b49\u4ef7\u4e8e JSON \u4e2d\u7684&#8221;\u5b57\u6bb5&#8221;\uff0c\u90a3\u8be5\u600e\u4e48\u7ffb\u8bd1 JWT Claims \u6bd4\u8f83\u597d\u5462\uff1f\u6216\u8005\u8bf4\u4e3a\u4ec0\u4e48\u8981\u53d6\u540d\u4e3a Claims\uff0c\u5e0c\u671b\u5927\u4f6c\u4e0d\u541d\u8d50\u6559\u3002<\/p>\n<blockquote>\n<p>The JWT Claims Set represents a JSON object whose members are the claims conveyed by the JWT. The Claim Names within a JWT Claims Set MUST be unique; JWT parsers MUST either reject JWTs with duplicate Claim Names or use a JSON parser that returns only the lexically last duplicate member name, as specified in Section 15.12 (&#8220;The JSON Object&#8221;) of ECMAScript 5.1 [ECMAScript].<\/p>\n<\/blockquote>\n<blockquote>\n<p>The claims in a JWT are encoded as a JSON object that is used as the payload of a JSON Web Signature (JWS) structure<\/p>\n<\/blockquote><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>12<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5077067\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : catror <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5c31\u7ffb\u8bd1\u6210\u5b57\u6bb5\u5457\uff0cclaims \u8fd9\u4e2a\u8bcd\u5e26\u70b9\u201c\u53ef\u4fe1\u201d\u7684\u610f\u601d\uff0c\u76f8\u5bf9\u6bd4\u8f83\u6b63\u5f0f\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5077068\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : bigbyto <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @catror \u6211\u627e\u4e86\u4e00\u4e0b\uff0cClaims \u662f\u67d0\u4e2a\u9886\u57df\u7684\u4e13\u4e1a\u672f\u8bed\uff0c\u8be6\u60c5\u53ef\u4ee5\u53c2\u8003\u7ef4\u57fa\u767e\u79d1\u3002https:\/\/en.wikipedia.org\/wiki\/Claims-based_identity                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5077069\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : u20024804 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6770\u6253\u5e03\u68e3 \u514b\u6765\u59c6\u65af                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5077070\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ditel <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8f7d\u8377<br \/>\u597d\u50cf\u662f\u8fd9\u4e2a\u8bf4\u6cd5                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5077071\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : chihiro2014 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ditel \u8f7d\u8377\u662f payload                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5077072\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : minsheng <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u58f0\u660e\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5077073\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : minsheng <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd9\u91cc claim \u5c31\u662f\uff08\u4e2d\u5b66\u65f6\u5b66\u7684\uff09\u82f1\u6587\u539f\u610f\uff0c\u4f5c\u4e3a\u540d\u8bcd\u8fd8\u771f\u4e0d\u77e5\u9053\u600e\u4e48\u7ffb\u8bd1                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5077074\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : whevether <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @chihiro2014 \u5c31\u662f\u53eb\u8f7d\u8377\uff0c\u4f60 claim \u4e2d\u7684\u4fe1\u606f\u5c31\u5728 payload \u8f7d\u8377\u4e2d\u3002\u4f60\u524d\u7aef abot(&#8216;\u4f60\u7684 jwt&#8217;.split(&#8216;.&#8217;)[1]) \u4e2d\u7684 payload \u90e8\u5206\u4f60\u770b\u770b\u91cc\u9762\u7684\u4fe1\u606f\u5c31\u662f\u4f60\u5199\u5165\u5230 claim \u4e2d\u7684\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5077075\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : bigbyto <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @whevether \u662f\u4e24\u4e2a\u6982\u5ff5\u3002\u53ef\u4ee5\u8bf4 claims \u662f JWS \u7ed3\u6784\u7684 payload\uff0c\u5b83\u672c\u8eab\u662f\u6709\u81ea\u5df1\u7684\u542b\u4e49\u7684\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5077076\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : bigbyto <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @minsheng \u53ef\u4ee5\u53c2\u8003\u4e00\u4e0b\u6211 append \u7684\u5185\u5bb9\uff0c\u8fd9\u4e2a\u5355\u8bcd\u8ddf handle \u548c socket \u8fd9\u4e9b\u4e00\u6837\uff0c\u6700\u597d\u5c31\u662f\u4e0d\u8981\u7ffb\u8bd1\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5077077\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : billccn <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u514b\u96f7\u59c6\u65af \u53c2\u8003\u9c81\u68d2\u6027                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5077078\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wjswxp <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5ba3\u79f0\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>JWT Claims \u8be5\u5982\u4f55\u7ffb\u8bd1 &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\/300009"}],"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=300009"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/300009\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=300009"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=300009"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=300009"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}