{"id":2180,"date":"2022-10-29T14:44:43","date_gmt":"2022-10-29T05:44:43","guid":{"rendered":"http:\/\/www.agile-software.site\/?p=2180"},"modified":"2022-10-29T14:48:14","modified_gmt":"2022-10-29T05:48:14","slug":"jwt%e3%83%88%e3%83%bc%e3%82%af%e3%83%b3","status":"publish","type":"post","link":"https:\/\/agile-software.net\/?p=2180","title":{"rendered":"JWT\u30c8\u30fc\u30af\u30f3"},"content":{"rendered":"\n<p>JWT\u3068\u306fJSON Web Token\u306e\u7565\u79f0\u3067\u3042\u308a\u3001\u5c5e\u6027\u60c5\u5831\uff08Claim\uff09\u3092JSON\u30c7\u30fc\u30bf\u69cb\u9020\u3067\u8868\u73fe\u3057\u305f\u30c8\u30fc\u30af\u30f3\u306e\u4ed5\u69d8\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">JWT\u306e\u4f8b<\/h2>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ<\/code><\/pre><\/div>\n\n\n\n<p>JWT\u306e\u69cb\u6210\u3092\u308f\u304b\u308a\u3084\u3059\u304f\u3059\u308b\u305f\u3081\u3001\u6539\u884c\u3092\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9\n.\neyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9\n.\nTJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ<\/code><\/pre><\/div>\n\n\n\n<p>\u3059\u308b\u3068\u3001JWT\u306f2\u3064\u306e\u30d4\u30ea\u30aa\u30c9\uff08&#8221;.&#8221;\uff09\u3067\u533a\u5207\u3089\u308c\u305f3\u3064\u306e\u30d1\u30fc\u30c8\u306b\u3088\u3063\u3066\u6210\u308a\u7acb\u3063\u3066\u3044\u308b\u3068\u3044\u3046\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002<br>\u3053\u306e3\u3064\u306e\u30d1\u30fc\u30c8\u306b\u306f\u305d\u308c\u305e\u308c\u5f79\u5272\u304c\u3042\u308a\u3001\u524d\u304b\u3089\u9806\u756a\u306b\u30d8\u30c3\u30c0\u30fc\uff08Header\uff09\u3001\u30da\u30a4\u30ed\u30fc\u30c9\uff08Payload\uff09\u3001\u7f72\u540d\uff08Signature\uff09\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>&lt;\u30d8\u30c3\u30c0\u30fc&gt;.&lt;\u30da\u30a4\u30ed\u30fc\u30c9&gt;.&lt;\u7f72\u540d&gt;<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"-\">\u30d8\u30c3\u30c0\u30fc<\/h3>\n\n\n\n<p>\u30d8\u30c3\u30c0\u30fc\u306fJWT\u306e\u7f72\u540d\u691c\u8a3c\u3092\u884c\u3046\u305f\u3081\u306b\u5fc5\u8981\u306a\u60c5\u5831\u3092\u683c\u7d0d\u3059\u308b\u305f\u3081\u306e\u30d1\u30fc\u30c8\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br>\u6587\u5b57\u5217\u306e\u5f62\u5f0f\u3068\u3057\u3066\u306f\u3001\u30ad\u30fc\u540d\u3068\u5024\u306e\u30da\u30a2\u3067\u8868\u73fe\u3055\u308c\u305fJSON\u3092Base64url\u30a8\u30f3\u30b3\u30fc\u30c9\u3057\u305f\u6587\u5b57\u5217\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br>Base64\u30a8\u30f3\u30b3\u30fc\u30c9\u306e\u5834\u5408\u306f&#8221;+&#8221;, &#8220;\/&#8221;, &#8220;=&#8221;\u304c\u542b\u307e\u308c\u307e\u3059\u304c\u3001JWT\u306fURI\u306e\u30af\u30a8\u30ea\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306a\u3069\u306b\u4f7f\u7528\u3055\u308c\u308b\u3053\u3068\u3092\u60f3\u5b9a\u3057\u3066\u3044\u308b\u306e\u3067\u3001URL-safe\u306b\u8868\u73fe\u3059\u308b\u305f\u3081\u306bBase64url\u30a8\u30f3\u30b3\u30fc\u30c9\u304c\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br>Base64url\u30a8\u30f3\u30b3\u30fc\u30c9\u3067\u306f&#8221;+&#8221;\u3092&#8221;-&#8220;\u306b\u3001&#8221;\/&#8221;\u3092&#8221;_&#8221;\u3001&#8221;=&#8221;\u3092&#8221;&#8221;\u306b\u5909\u63db\u3057\u3066\u3044\u307e\u3059\u3002<br>\u30c7\u30b3\u30fc\u30c9\u3092\u3059\u308b\u3068JSON\u306b\u5909\u63db\u3067\u304d\u308b\u306e\u3067\u3001\u30c7\u30b3\u30fc\u30c9\u3092\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"-\">\u30da\u30a4\u30ed\u30fc\u30c9<\/h3>\n\n\n\n<p>\u30da\u30a4\u30ed\u30fc\u30c9\u306f\u3084\u308a\u3068\u308a\u306b\u5fc5\u8981\u306a\u5c5e\u6027\u60c5\u5831\uff08Claim\uff09\u3067\u3059\u3002<br>\u30da\u30a4\u30ed\u30fc\u30c9\u306e\u5185\u5bb9\u306f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u3088\u3063\u3066\u306f\u7570\u306a\u308b\u305f\u3081\u3001\u5fc5\u9808\u3068\u3055\u308c\u308b\u3082\u306e\u306f\u5b58\u5728\u3057\u307e\u305b\u3093\u304c\u3001\u76f8\u4e92\u904b\u7528\u6027\u306e\u3042\u308b\u5c5e\u6027\u60c5\u5831\u306b\u3064\u3044\u3066\u306f\u4e88\u7d04\u6e08\u307f\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3068\u3057\u3066\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br>\u30d8\u30c3\u30c0\u30fc\u3068\u540c\u69d8\u306b\u3001JSON\u3092Base64url\u30a8\u30f3\u30b3\u30fc\u30c9\u3057\u305f\u6587\u5b57\u5217\u306a\u306e\u3067\u3001\u30c7\u30b3\u30fc\u30c9\u304c\u5bb9\u6613\u306b\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>{\n  &quot;admin&quot;: true,\n  &quot;name&quot;: &quot;John Doe&quot;,\n  &quot;sub&quot;: &quot;1234567890&quot;\n}<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">JWT\u3092\u5229\u7528\u3057\u305f<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">OAuth 2.0\u306eAccess Token\u53d6\u5f97\u306e\u305f\u3081\u306eJWT\u306e\u5229\u7528<\/h3>\n\n\n\nhttp:\/\/www.agile-software.site\/2022\/07\/16\/oauth%e3%81%a8%e3%81%af%ef%bc%9f\/\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>JWT\u3068\u306fJSON Web Token\u306e\u7565\u79f0\u3067\u3042\u308a\u3001\u5c5e\u6027\u60c5\u5831\uff08Claim\uff09\u3092JSON\u30c7\u30fc\u30bf\u69cb\u9020\u3067\u8868\u73fe\u3057\u305f\u30c8\u30fc\u30af\u30f3\u306e\u4ed5\u69d8\u3067\u3059\u3002 JWT\u306e\u4f8b JWT\u306e\u69cb\u6210\u3092\u308f\u304b\u308a\u3084\u3059\u304f\u3059\u308b\u305f\u3081\u3001\u6539\u884c\u3092\u3057\u3066\u307f\u307e\u3059\u3002 \u3059\u308b\u3068\u3001JWT\u306f2\u3064\u306e\u30d4\u30ea<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jin_ogp_image_url":"","_jin_last_featured_id":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2180","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/2180","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2180"}],"version-history":[{"count":2,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/2180\/revisions"}],"predecessor-version":[{"id":2183,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/2180\/revisions\/2183"}],"wp:attachment":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}