{"id":148,"date":"2025-09-17T14:49:25","date_gmt":"2025-09-17T05:49:25","guid":{"rendered":"https:\/\/ik1-221-80670.vs.sakura.ne.jp\/wordpress\/archives\/148"},"modified":"2026-06-21T18:06:35","modified_gmt":"2026-06-21T09:06:35","slug":"jwt%ef%bc%88json-web-token%ef%bc%89%e3%81%a8%e3%81%af%ef%bc%9f%e4%bb%95%e7%b5%84%e3%81%bf%e3%81%a8%e6%b4%bb%e7%94%a8%e6%96%b9%e6%b3%95%e3%82%92%e8%a7%a3%e8%aa%ac","status":"publish","type":"post","link":"https:\/\/www.marchboy.xyz\/wordpress\/archives\/148","title":{"rendered":"JWT\uff08JSON Web Token\uff09\u3068\u306f\uff1f"},"content":{"rendered":"<p>\u8fd1\u5e74\u3001Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3084API\u306e\u8a8d\u8a3c\u30fb\u8a8d\u53ef\u306b\u304a\u3044\u3066\u3088\u304f\u4f7f\u308f\u308c\u308b\u306e\u304c <strong>JWT\uff08JSON Web Token\uff09<\/strong> \u3067\u3059\u3002\u672c\u8a18\u4e8b\u3067\u306f\u3001JWT\u306e\u6982\u8981\u304b\u3089\u4ed5\u7d44\u307f\u3001\u5229\u7528\u65b9\u6cd5\u3001\u6ce8\u610f\u70b9\u307e\u3067\u308f\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<hr \/>\n<h2>JWT\u3068\u306f\uff1f<\/h2>\n<p>JWT\uff08JSON Web Token\uff09\u3068\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u8a8d\u8a3c\u3084\u60c5\u5831\u306e\u5b89\u5168\u306a\u3084\u308a\u53d6\u308a\u306b\u7528\u3044\u3089\u308c\u308b <strong>\u30c8\u30fc\u30af\u30f3\u30d9\u30fc\u30b9\u306e\u8a8d\u8a3c\u65b9\u5f0f<\/strong> \u3067\u3059\u3002<br \/>\nJSON\u5f62\u5f0f\u3067\u8868\u73fe\u3055\u308c\u3001\u7f72\u540d\u304c\u4ed8\u4e0e\u3055\u308c\u308b\u3053\u3068\u3067 <strong>\u6539\u3056\u3093\u691c\u77e5<\/strong> \u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u5f93\u6765\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u65b9\u5f0f\u3068\u306f\u7570\u306a\u308a\u3001\u30b5\u30fc\u30d0\u30fc\u5074\u3067\u30bb\u30c3\u30b7\u30e7\u30f3\u60c5\u5831\u3092\u4fdd\u6301\u3059\u308b\u5fc5\u8981\u304c\u306a\u304f\u3001<strong>\u30b9\u30c6\u30fc\u30c8\u30ec\u30b9\u306a\u8a8d\u8a3c<\/strong> \u304c\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002<\/p>\n<hr \/>\n<h2>JWT\u306e\u69cb\u9020<\/h2>\n<p>JWT\u306f\u6b21\u306e3\u3064\u306e\u90e8\u5206\u304b\u3089\u69cb\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<ol>\n<li><strong>Header\uff08\u30d8\u30c3\u30c0\u30fc\uff09<\/strong><br \/>\n\u4f7f\u7528\u3059\u308b\u7f72\u540d\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306a\u3069\u3092\u6307\u5b9a\u3002<\/p>\n<\/li>\n<li>\n<p><strong>Payload\uff08\u30da\u30a4\u30ed\u30fc\u30c9\uff09<\/strong><br \/>\n\u30e6\u30fc\u30b6\u30fcID\u3084\u6709\u52b9\u671f\u9650\u306a\u3069\u3001\u5b9f\u969b\u306b\u4f1d\u3048\u305f\u3044\u60c5\u5831\u3092\u542b\u3080\u3002<\/p>\n<\/li>\n<li>\n<p><strong>Signature\uff08\u7f72\u540d\uff09<\/strong><br \/>\n\u30d8\u30c3\u30c0\u30fc\u3068\u30da\u30a4\u30ed\u30fc\u30c9\u3092\u79d8\u5bc6\u9375\u3067\u7f72\u540d\u3057\u305f\u3082\u306e\u3002\u6539\u3056\u3093\u9632\u6b62\u306e\u5f79\u5272\u3092\u6301\u3064\u3002<\/p>\n<\/li>\n<\/ol>\n<p>\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\uff1a<\/p>\n<pre><code>xxxxx.yyyyy.zzzzz\n<\/code><\/pre>\n<hr \/>\n<h2>JWT\u306e\u30e1\u30ea\u30c3\u30c8<\/h2>\n<ul>\n<li><strong>\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u3067\u30b9\u30b1\u30fc\u30e9\u30d6\u30eb<\/strong><br \/>\n\u30bb\u30c3\u30b7\u30e7\u30f3\u60c5\u5831\u3092\u30b5\u30fc\u30d0\u30fc\u306b\u4fdd\u5b58\u3057\u306a\u3044\u305f\u3081\u3001\u8907\u6570\u30b5\u30fc\u30d0\u30fc\u9593\u3067\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u5171\u6709\u304c\u4e0d\u8981\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u6539\u3056\u3093\u691c\u77e5\u304c\u53ef\u80fd<\/strong><br \/>\n\u7f72\u540d\u4ed8\u304d\u306e\u305f\u3081\u3001\u30c8\u30fc\u30af\u30f3\u304c\u6539\u3056\u3093\u3055\u308c\u3066\u3044\u306a\u3044\u304b\u691c\u8a3c\u3067\u304d\u308b\u3002<\/p>\n<\/li>\n<li>\n<p><strong>API\u8a8d\u8a3c\u306b\u6700\u9069<\/strong><br \/>\nREST API\u3084GraphQL\u306a\u3069\u306e\u8a8d\u8a3c\u306b\u5e83\u304f\u5229\u7528\u53ef\u80fd\u3002<\/p>\n<\/li>\n<\/ul>\n<hr \/>\n<h2>JWT\u5229\u7528\u6642\u306e\u6ce8\u610f\u70b9<\/h2>\n<ul>\n<li>\n<p><strong>\u30da\u30a4\u30ed\u30fc\u30c9\u306f\u6697\u53f7\u5316\u3055\u308c\u306a\u3044<\/strong><br \/>\nBase64URL\u5f62\u5f0f\u3067\u30a8\u30f3\u30b3\u30fc\u30c9\u3055\u308c\u308b\u3060\u3051\u306a\u306e\u3067\u3001\u6a5f\u5bc6\u60c5\u5831\u306f\u5165\u308c\u306a\u3044\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u6709\u52b9\u671f\u9650\u306e\u8a2d\u5b9a\u304c\u5fc5\u9808<\/strong><br \/>\n\u30c8\u30fc\u30af\u30f3\u306e\u6709\u52b9\u671f\u9650\u3092\u9069\u5207\u306b\u8a2d\u5b9a\u3057\u306a\u3044\u3068\u3001\u4e0d\u6b63\u5229\u7528\u306e\u30ea\u30b9\u30af\u304c\u9ad8\u307e\u308b\u3002<\/p>\n<\/li>\n<li>\n<p><strong>HTTPS\u306e\u5229\u7528\u304c\u524d\u63d0<\/strong><br \/>\n\u5e73\u6587\u901a\u4fe1\u3067\u306f\u76d7\u8074\u3055\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u305f\u3081\u3001HTTPS\u3092\u5fc5\u305a\u5229\u7528\u3059\u308b\u3002<\/p>\n<\/li>\n<\/ul>\n<hr \/>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>JWT\u306f\u3001\u30bb\u30c3\u30b7\u30e7\u30f3\u30ec\u30b9\u3067\u30b9\u30b1\u30fc\u30e9\u30d6\u30eb\u306a\u8a8d\u8a3c\u3092\u53ef\u80fd\u306b\u3059\u308b\u4fbf\u5229\u306a\u4ed5\u7d44\u307f\u3067\u3059\u3002<br \/>\nAPI\u8a8d\u8a3c\u3084\u30e2\u30d0\u30a4\u30eb\u30a2\u30d7\u30ea\u3001SPA\uff08\u30b7\u30f3\u30b0\u30eb\u30da\u30fc\u30b8\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\uff09\u306a\u3069\u3067\u5e83\u304f\u5229\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u306e\u6ce8\u610f\u70b9\u3082\u591a\u3044\u305f\u3081\u3001\u6b63\u3057\u3044\u7406\u89e3\u3068\u904b\u7528\u304c\u6b20\u304b\u305b\u307e\u305b\u3093\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd1\u5e74\u3001Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3084API\u306e\u8a8d\u8a3c\u30fb\u8a8d\u53ef\u306b\u304a\u3044\u3066\u3088\u304f\u4f7f\u308f\u308c\u308b\u306e\u304c JWT\uff08JSON Web Token\uff09 \u3067\u3059\u3002\u672c\u8a18\u4e8b\u3067\u306f\u3001JWT\u306e\u6982\u8981\u304b\u3089\u4ed5\u7d44\u307f\u3001\u5229\u7528\u65b9\u6cd5\u3001\u6ce8\u610f\u70b9\u307e\u3067\u308f\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3057\u307e\u3059\u3002 JWT\u3068\u306f\uff1f JW [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-148","post","type-post","status-publish","format-standard","hentry","category-web"],"_links":{"self":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/posts\/148","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/comments?post=148"}],"version-history":[{"count":1,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/posts\/148\/revisions"}],"predecessor-version":[{"id":400,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/posts\/148\/revisions\/400"}],"wp:attachment":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/media?parent=148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/categories?post=148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/tags?post=148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}