{"id":324,"date":"2025-09-05T15:54:11","date_gmt":"2025-09-05T06:54:11","guid":{"rendered":"https:\/\/i-third.org\/blog\/?p=324"},"modified":"2025-09-05T15:54:11","modified_gmt":"2025-09-05T06:54:11","slug":"jwt%e3%83%99%e3%83%bc%e3%82%b9%e3%81%aesso%e8%aa%8d%e8%a8%bc%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9%e3%82%92%e3%82%bc%e3%83%ad%e3%81%8b%e3%82%89%e6%a7%8b%e7%af%89%ef%bc%81%e6%9c%80%e6%96%b0%e3%82%a2","status":"publish","type":"post","link":"https:\/\/i-third.org\/blog\/?p=324","title":{"rendered":"JWT\u30d9\u30fc\u30b9\u306eSSO\u8a8d\u8a3c\u30b5\u30fc\u30d3\u30b9\u3092\u30bc\u30ed\u304b\u3089\u69cb\u7bc9\uff01\u6700\u65b0\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3068\u5b9f\u88c5\u306e\u3059\u3079\u3066"},"content":{"rendered":"<div class=\"blog-post\">\n<p>\n    <strong>\u300c\u8907\u6570\u306eWeb\u30a2\u30d7\u30ea\u3092\u958b\u767a\u3057\u3066\u3044\u308b\u304c\u3001\u30ed\u30b0\u30a4\u30f3\u6a5f\u80fd\u304c\u30d0\u30e9\u30d0\u30e9\u3067\u7ba1\u7406\u304c\u5927\u5909\u2026\u300d<\/strong><br \/>\n    \u3042\u306a\u305f\u306f\u4eca\u3001\u305d\u3093\u306a\u8ab2\u984c\u306b\u76f4\u9762\u3057\u3066\u3044\u307e\u305b\u3093\u304b\uff1f<br \/>\n    \u30e6\u30fc\u30b6\u30fc\u306f\u30a2\u30d7\u30ea\u3054\u3068\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u899a\u3048\u308b\u5fc5\u8981\u304c\u3042\u308a\u3001\u958b\u767a\u8005\u306f\u5404\u30a2\u30d7\u30ea\u306b\u8a8d\u8a3c\u30ed\u30b8\u30c3\u30af\u3092\u5b9f\u88c5\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u4f53\u9a13\u3068\u958b\u767a\u52b9\u7387\u306e\u53cc\u65b9\u306b\u3068\u3063\u3066\u5927\u304d\u306a\u554f\u984c\u3067\u3059\u3002\n<\/p>\n<p>\n    \u3053\u3093\u306b\u3061\u306f\u3002\u30b7\u30b9\u30c6\u30e0\u30a8\u30f3\u30b8\u30cb\u30a2\u3068\u3057\u3066\u3001\u591a\u304f\u306e\u30de\u30a4\u30af\u30ed\u30b5\u30fc\u30d3\u30b9\u9023\u643a\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u643a\u308f\u3063\u3066\u304d\u305f\u7b46\u8005\u304c\u3001\u4eca\u56de\u306f<strong>JWT\uff08JSON Web Token\uff09\u30d9\u30fc\u30b9\u306eSSO\u8a8d\u8a3c\u30b5\u30fc\u30d3\u30b9<\/strong>\u306e\u69cb\u7bc9\u65b9\u6cd5\u3092\u3001\u5177\u4f53\u7684\u306a\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u304b\u3089\u5b9f\u88c5\u306e\u30dd\u30a4\u30f3\u30c8\u307e\u3067\u5fb9\u5e95\u89e3\u8aac\u3057\u307e\u3059\u3002\n<\/p>\n<p>\n    \u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u5805\u7262\u3067\u30b9\u30b1\u30fc\u30e9\u30d6\u30eb\u306a\u8a8d\u8a3c\u30b7\u30b9\u30c6\u30e0\u3092\u3069\u306e\u3088\u3046\u306b\u8a2d\u8a08\u3057\u3001\u5b9f\u88c5\u3059\u308c\u3070\u3088\u3044\u304b\u304c\u660e\u78ba\u306b\u306a\u308a\u3001\u3042\u306a\u305f\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u6b21\u306e\u30ec\u30d9\u30eb\u3078\u3068\u5f15\u304d\u4e0a\u3052\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3067\u3057\u3087\u3046\u3002\n<\/p>\n<hr>\n<h2>\u76ee\u6b21<\/h2>\n<ul>\n<li><a href=\"#section-1\">\u306a\u305cSSO\u8a8d\u8a3c\u30b5\u30fc\u30d3\u30b9\u304c\u5fc5\u8981\u306a\u306e\u304b\uff1f<\/a><\/li>\n<li><a href=\"#section-2\">\u8a8d\u8a3c\u30b5\u30fc\u30d3\u30b9\u306e\u6838\u3068\u306a\u308b\u6280\u8853\uff1aJWT\u306e\u69cb\u9020\u3068\u5f79\u5272<\/a><\/li>\n<li><a href=\"#section-3\">\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u5168\u4f53\u50cf\uff1aSSO\u8a8d\u8a3c\u30b5\u30fc\u30d3\u30b9\u306e\u30c7\u30b6\u30a4\u30f3<\/a><\/li>\n<li><a href=\"#section-4\">\u5177\u4f53\u7684\u306a\u5b9f\u88c5\u624b\u9806\uff1a\u5404\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u5f79\u5272\u3068\u30b3\u30fc\u30c9\u4f8b<\/a><\/li>\n<li><a href=\"#section-5\">\u307e\u3068\u3081\uff1a\u672a\u6765\u5fd7\u5411\u306e\u8a8d\u8a3c\u57fa\u76e4\u3092\u69cb\u7bc9\u3059\u308b<\/a><\/li>\n<\/ul>\n<hr>\n<h2 id=\"section-1\">\u306a\u305cSSO\u8a8d\u8a3c\u30b5\u30fc\u30d3\u30b9\u304c\u5fc5\u8981\u306a\u306e\u304b\uff1f<\/h2>\n<p>\n    \u5f93\u6765\u306e\u30e2\u30ce\u30ea\u30b7\u30c3\u30af\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u3001\u30ed\u30b0\u30a4\u30f3\u6a5f\u80fd\u306f\u30a2\u30d7\u30ea\u5185\u90e8\u306b\u7d44\u307f\u8fbc\u307e\u308c\u3066\u3044\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u30b5\u30fc\u30d3\u30b9\u304c\u7d30\u5206\u5316\u3055\u308c\u3001\u30de\u30a4\u30af\u30ed\u30b5\u30fc\u30d3\u30b9\u5316\u304c\u9032\u3080\u306b\u3064\u308c\u3066\u3001\u3053\u306e\u3084\u308a\u65b9\u3067\u306f\u975e\u52b9\u7387\u306b\u306a\u308a\u307e\u3059\u3002\n<\/p>\n<p>\n    \u8a8d\u8a3c\u3092\u72ec\u7acb\u3057\u305f\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u5207\u308a\u51fa\u3059\u3053\u3068\u3067\u3001\u4ee5\u4e0b\u306e\u30e1\u30ea\u30c3\u30c8\u304c\u5f97\u3089\u308c\u307e\u3059\u3002\n<\/p>\n<ul>\n<li><strong>\u30e6\u30fc\u30b6\u30fc\u4f53\u9a13\u306e\u5411\u4e0a<\/strong>: \u30e6\u30fc\u30b6\u30fc\u306f\u4e00\u5ea6\u30ed\u30b0\u30a4\u30f3\u3059\u308c\u3070\u3001\u4ed6\u306e\u30b5\u30fc\u30d3\u30b9\u3067\u3082\u30b7\u30fc\u30e0\u30ec\u30b9\u306b\u5229\u7528\u3067\u304d\u307e\u3059\u3002<\/li>\n<li><strong>\u958b\u767a\u52b9\u7387\u306e\u5411\u4e0a<\/strong>: \u5404\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u8a8d\u8a3c\u30ed\u30b8\u30c3\u30af\u3092\u6301\u3064\u5fc5\u8981\u304c\u306a\u304f\u306a\u308a\u3001\u672c\u6765\u306e\u30d3\u30b8\u30cd\u30b9\u30ed\u30b8\u30c3\u30af\u958b\u767a\u306b\u96c6\u4e2d\u3067\u304d\u307e\u3059\u3002<\/li>\n<li><strong>\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u4e00\u5143\u7ba1\u7406<\/strong>: \u8a8d\u8a3c\u30fb\u8a8d\u53ef\u306b\u95a2\u3059\u308b\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30dd\u30ea\u30b7\u30fc\u3092\u5358\u4e00\u306e\u30b5\u30fc\u30d3\u30b9\u3067\u7ba1\u7406\u3067\u304d\u3001\u8106\u5f31\u6027\u5bfe\u7b56\u304c\u5bb9\u6613\u306b\u306a\u308a\u307e\u3059\u3002<\/li>\n<\/ul>\n<hr>\n<h2 id=\"section-2\">\u8a8d\u8a3c\u30b5\u30fc\u30d3\u30b9\u306e\u6838\u3068\u306a\u308b\u6280\u8853\uff1aJWT\u306e\u69cb\u9020\u3068\u5f79\u5272<\/h2>\n<p>\n    JWT\u306f\u3001SSO\u8a8d\u8a3c\u30b5\u30fc\u30d3\u30b9\u306e\u4e2d\u5fc3\u7684\u306a\u5f79\u5272\u3092\u62c5\u3044\u307e\u3059\u3002\n<\/p>\n<p>\n    JWT\u306f\u3001**\u30b9\u30c6\u30fc\u30c8\u30ec\u30b9\uff08\u7121\u72b6\u614b\uff09**\u306a\u8a8d\u8a3c\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306e\u30c8\u30fc\u30af\u30f3\u3067\u3059\u3002\u30e6\u30fc\u30b6\u30fc\u306e\u72b6\u614b\u3092\u30b5\u30fc\u30d0\u30fc\u306b\u4fdd\u5b58\u3057\u306a\u3044\u305f\u3081\u3001\u3069\u306e\u30b5\u30fc\u30d0\u30fc\u304c\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u53d7\u3051\u53d6\u3063\u3066\u3082\u3001\u30c8\u30fc\u30af\u30f3\u3092\u691c\u8a3c\u3059\u308b\u3060\u3051\u3067\u30e6\u30fc\u30b6\u30fc\u3092\u8b58\u5225\u3067\u304d\u307e\u3059\u3002\n<\/p>\n<p>\n    JWT\u306f\u3001\u4ee5\u4e0b\u306e3\u3064\u306e\u90e8\u5206\u304b\u3089\u69cb\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002\n<\/p>\n<p>\n    <strong><code>\u30d8\u30c3\u30c0\u30fc.\u30da\u30a4\u30ed\u30fc\u30c9.\u7f72\u540d<\/code><\/strong>\n<\/p>\n<ul>\n<li><strong>\u30d8\u30c3\u30c0\u30fc (Header)<\/strong>: \u7f72\u540d\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\uff08\u4f8b: RS256\uff09\u3068\u30c8\u30fc\u30af\u30f3\u306e\u30bf\u30a4\u30d7\uff08JWT\uff09\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/li>\n<li><strong>\u30da\u30a4\u30ed\u30fc\u30c9 (Payload)<\/strong>: \u30e6\u30fc\u30b6\u30fcID\u3001\u30ed\u30fc\u30eb\u3001\u6709\u52b9\u671f\u9650\u306a\u3069\u306e\u60c5\u5831\u3092\u683c\u7d0d\u3057\u307e\u3059\u3002\u3053\u3053\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u3088\u3046\u306a\u6a5f\u5bc6\u60c5\u5831\u306f\u542b\u3081\u307e\u305b\u3093\u3002<\/li>\n<li><strong>\u7f72\u540d (Signature)<\/strong>: \u30d8\u30c3\u30c0\u30fc\u3068\u30da\u30a4\u30ed\u30fc\u30c9\u304c\u6539\u3056\u3093\u3055\u308c\u3066\u3044\u306a\u3044\u3053\u3068\u3092\u4fdd\u8a3c\u3059\u308b\u305f\u3081\u306e\u3082\u306e\u3067\u3059\u3002<\/li>\n<\/ul>\n<p>\n    \u3053\u306e\u7f72\u540d\u304c\u3042\u308b\u3053\u3068\u3067\u3001JWT\u306f\u5b89\u5168\u306b\u60c5\u5831\u3092\u3084\u308a\u53d6\u308a\u3067\u304d\u308b\u306e\u3067\u3059\u3002\n<\/p>\n<hr>\n<h2 id=\"section-3\">\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u5168\u4f53\u50cf\uff1aSSO\u8a8d\u8a3c\u30b5\u30fc\u30d3\u30b9\u306e\u30c7\u30b6\u30a4\u30f3<\/h2>\n<p><!--\n\n<p>\n    \u4ee5\u4e0b\u306b\u3001JWT\u30d9\u30fc\u30b9\u306eSSO\u8a8d\u8a3c\u30b5\u30fc\u30d3\u30b9\u306e\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3092\u793a\u3057\u307e\u3059\u3002\n<\/p>\n\n\n\n\n<p>\n    <img decoding=\"async\" src=\"https:\/\/i.imgur.com\/5l3qW1Z.png\" alt=\"JWT SSO \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u56f3\" \/>\n<\/p>\n\n\n--><\/p>\n<ul>\n<li><strong>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\uff08\u30e6\u30fc\u30b6\u30fc\uff09<\/strong>: \u30ed\u30b0\u30a4\u30f3\u5f8c\u3001\u8a8d\u8a3c\u30b5\u30fc\u30d3\u30b9\u304b\u3089\u53d7\u3051\u53d6\u3063\u305fJWT\u3092\u3059\u3079\u3066\u306eAPI\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u542b\u3081\u307e\u3059\u3002<\/li>\n<li><strong>SSO\u8a8d\u8a3c\u30b5\u30fc\u30d3\u30b9<\/strong>: \u8a8d\u8a3c\u306e\u5168\u8cac\u4efb\u3092\u62c5\u3044\u307e\u3059\u3002\u30ed\u30b0\u30a4\u30f3\u3001\u30ed\u30b0\u30a2\u30a6\u30c8\u3001\u30c8\u30fc\u30af\u30f3\u767a\u884c\u3001\u66f4\u65b0\u3001\u691c\u8a3c\u306eAPI\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/li>\n<li><strong>\u5404\u30de\u30a4\u30af\u30ed\u30b5\u30fc\u30d3\u30b9<\/strong>: JWT\u691c\u8a3c\u30d5\u30a3\u30eb\u30bf\u30fc\u3092\u5b9f\u88c5\u3057\u3001\u53d7\u3051\u53d6\u3063\u305f\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u8a8d\u8a3c\u72b6\u614b\u3092\u30c1\u30a7\u30c3\u30af\u3057\u307e\u3059\u3002\u6709\u52b9\u306a\u30c8\u30fc\u30af\u30f3\u3092\u6301\u305f\u306a\u3044\u30ea\u30af\u30a8\u30b9\u30c8\u306f\u62d2\u5426\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<p>\n    \u3053\u306e\u8a2d\u8a08\u306b\u3088\u308a\u3001\u5404\u30de\u30a4\u30af\u30ed\u30b5\u30fc\u30d3\u30b9\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u8a8d\u8a3c\u30c6\u30fc\u30d6\u30eb\u3084\u30d1\u30b9\u30ef\u30fc\u30c9\u30cf\u30c3\u30b7\u30e5\u3068\u3044\u3063\u305f\u8a73\u7d30\u306a\u60c5\u5831\u3092\u77e5\u308b\u5fc5\u8981\u304c\u306a\u304f\u306a\u308a\u307e\u3059\u3002\n<\/p>\n<hr>\n<h2 id=\"section-4\">\u5177\u4f53\u7684\u306a\u5b9f\u88c5\u624b\u9806\uff1a\u5404\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u5f79\u5272\u3068\u30b3\u30fc\u30c9\u4f8b<\/h2>\n<h3>\u30b9\u30c6\u30c3\u30d71\uff1a\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u6e96\u5099\u3068BCrypt\u306b\u3088\u308b\u30d1\u30b9\u30ef\u30fc\u30c9\u30cf\u30c3\u30b7\u30e5<\/h3>\n<p>\n    \u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u5fc5\u305a<strong>\u30cf\u30c3\u30b7\u30e5\u5316<\/strong>\u3057\u3066\u4fdd\u5b58\u3057\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u30cf\u30c3\u30b7\u30e5\u306b\u7279\u5316\u3057\u305f**BCrypt**\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\n<\/p>\n<p>\n    <strong>BCrypt<\/strong>\u306f\u3001\u610f\u56f3\u7684\u306b\u51e6\u7406\u3092\u9045\u304f\u3059\u308b\u3053\u3068\u3067\u7dcf\u5f53\u305f\u308a\u653b\u6483\u3078\u306e\u8010\u6027\u3092\u9ad8\u3081\u3001\u81ea\u52d5\u7684\u306b\u30bd\u30eb\u30c8\u3092\u751f\u6210\u30fb\u7d44\u307f\u8fbc\u3080\u3053\u3068\u3067\u30ec\u30a4\u30f3\u30dc\u30fc\u30c6\u30fc\u30d6\u30eb\u653b\u6483\u3092\u9632\u304e\u307e\u3059\u3002\n<\/p>\n<pre><code>\/\/ PasswordUtil.java\npublic class PasswordUtil {\n    public static String hashPassword(String password) {\n        return BCrypt.hashpw(password, BCrypt.gensalt(12)); \/\/ 12\u30e9\u30a6\u30f3\u30c9\n    }\n    public static boolean checkPassword(String password, String hashed) {\n        return BCrypt.checkpw(password, hashed);\n    }\n}<\/code><\/pre>\n<h3>\u30b9\u30c6\u30c3\u30d72\uff1a\u8a8d\u8a3c\u30b5\u30fc\u30d3\u30b9\u306eTomcat\u8a2d\u5b9a<\/h3>\n<p>\n    Tomcat\u306f\u3001DataSourceRealm\u3092\u4f7f\u3063\u3066\u8a8d\u8a3c\u60c5\u5831\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\n<\/p>\n<ul>\n<li><strong><code>META-INF\/context.xml<\/code><\/strong><br \/>\n    \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u63a5\u7d9a\u3068DataSourceRealm\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/li>\n<li><strong><code>WEB-INF\/web.xml<\/code><\/strong><br \/>\n    \u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u30fc\u3068\u3057\u3066**JWT\u691c\u8a3c\u30d5\u30a3\u30eb\u30bf\u30fc**\u3092\u767b\u9332\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<pre><code>\/\/ web.xml\n&lt;filter&gt;\n    &lt;filter-name&gt;JwtAuthenticationFilter&lt;\/filter-name&gt;\n    &lt;filter-class&gt;com.example.auth.filter.JwtAuthenticationFilter&lt;\/filter-class&gt;\n&lt;\/filter&gt;\n&lt;filter-mapping&gt;\n    &lt;filter-name&gt;JwtAuthenticationFilter&lt;\/filter-name&gt;\n    &lt;url-pattern&gt;\/api\/*&lt;\/url-pattern&gt;\n&lt;\/filter-mapping&gt;<\/code><\/pre>\n<h3>\u30b9\u30c6\u30c3\u30d73\uff1aJWT\u751f\u6210\u30fb\u691c\u8a3c\u30ed\u30b8\u30c3\u30af<\/h3>\n<p>\n    JWT\u306e\u751f\u6210\u306b\u306f**RS256\uff08\u975e\u5bfe\u79f0\u9375\uff09**\u3092\u4f7f\u7528\u3057\u3001\u8a8d\u8a3c\u30b5\u30fc\u30d3\u30b9\u306e\u307f\u304c\u6301\u3064\u79d8\u5bc6\u9375\u3067\u7f72\u540d\u3057\u307e\u3059\u3002\n<\/p>\n<p>\n    <strong>JWT\u751f\u6210\uff08<code>AuthService.java<\/code>\uff09<\/strong>\n<\/p>\n<pre><code>\/\/ \u30ed\u30b0\u30a4\u30f3\u6210\u529f\u6642\u306bJWT\u3092\u751f\u6210\nString token = Jwts.builder()\n    .setSubject(user.getUserId())\n    .claim(\"roles\", user.getRoles())\n    .setIssuedAt(new Date())\n    .setExpiration(new Date(System.currentTimeMillis() + 3600000)) \/\/ 1\u6642\u9593\n    .signWith(privateKey, SignatureAlgorithm.RS256)\n    .compact();<\/code><\/pre>\n<p>\n    <strong>JWT\u691c\u8a3c\uff08<code>JwtUtil.java<\/code>\uff09<\/strong>\n<\/p>\n<pre><code>\/\/ \u4ed6\u306e\u30b5\u30fc\u30d3\u30b9\u304c\u30c8\u30fc\u30af\u30f3\u3092\u691c\u8a3c\npublic Jws&lt;Claims&gt; parseToken(String token) {\n    return Jwts.parserBuilder()\n        .setSigningKey(publicKey)\n        .build()\n        .parseClaimsJws(token);\n}<\/code><\/pre>\n<p>\n    \u516c\u958b\u9375\u306f`http:\/\/auth-service\/api\/config\/jwks`\u306e\u3088\u3046\u306a\u516c\u958b\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3067\u63d0\u4f9b\u3057\u3001\u5404\u30de\u30a4\u30af\u30ed\u30b5\u30fc\u30d3\u30b9\u304c\u52d5\u7684\u306b\u53d6\u5f97\u3059\u308b\u3088\u3046\u306b\u8a2d\u8a08\u3057\u307e\u3059\u3002\n<\/p>\n<h3>\u30b9\u30c6\u30c3\u30d74\uff1a\u30ea\u30d5\u30ec\u30c3\u30b7\u30e5\u30c8\u30fc\u30af\u30f3\u306b\u3088\u308b\u30bb\u30c3\u30b7\u30e7\u30f3\u7dad\u6301<\/h3>\n<p>\n    \u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3\u306e\u6709\u52b9\u671f\u9650\u304c\u5207\u308c\u305f\u5834\u5408\u3001\u30e6\u30fc\u30b6\u30fc\u306f\u30ea\u30d5\u30ec\u30c3\u30b7\u30e5\u30c8\u30fc\u30af\u30f3\u3092\u4f7f\u3063\u3066\u65b0\u3057\u3044\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u983b\u7e41\u306a\u30ed\u30b0\u30a4\u30f3\u3092\u9632\u304e\u307e\u3059\u3002\n<\/p>\n<p>\n    <strong>\u30d5\u30ed\u30fc<\/strong>:\n<\/p>\n<ol>\n<li>\u30ed\u30b0\u30a4\u30f3\u6642\u3001\u8a8d\u8a3c\u30b5\u30fc\u30d3\u30b9\u306f\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3\u3068\u30ea\u30d5\u30ec\u30c3\u30b7\u30e5\u30c8\u30fc\u30af\u30f3\u3092\u751f\u6210\u3057\u3001\u305d\u308c\u305e\u308c\u8fd4\u5374\u3057\u307e\u3059\u3002<\/li>\n<li>\u30ea\u30d5\u30ec\u30c3\u30b7\u30e5\u30c8\u30fc\u30af\u30f3\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u4fdd\u5b58\u3055\u308c\u3001\u6709\u52b9\u671f\u9650\u304c\u9577\u304f\u8a2d\u5b9a\u3055\u308c\u307e\u3059\u3002<\/li>\n<li>\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3\u304c\u671f\u9650\u5207\u308c\u306b\u306a\u308b\u3068\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306f\u30ea\u30d5\u30ec\u30c3\u30b7\u30e5\u30c8\u30fc\u30af\u30f3\u3092\u4f7f\u3063\u3066<code>\/api\/refresh<\/code>\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u308a\u3001\u65b0\u3057\u3044\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/li>\n<\/ol>\n<p>\n    \u3053\u308c\u306b\u3088\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u306f\u9577\u671f\u9593\u30ed\u30b0\u30a4\u30f3\u72b6\u614b\u3092\u7dad\u6301\u3067\u304d\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3082\u78ba\u4fdd\u3055\u308c\u307e\u3059\u3002\n<\/p>\n<hr>\n<h2 id=\"section-5\">\u307e\u3068\u3081\uff1a\u672a\u6765\u5fd7\u5411\u306e\u8a8d\u8a3c\u57fa\u76e4\u3092\u69cb\u7bc9\u3059\u308b<\/h2>\n<p>\n    SSO\u8a8d\u8a3c\u30b5\u30fc\u30d3\u30b9\u306f\u3001\u73fe\u4ee3\u306e\u8907\u96d1\u306aWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30b7\u30f3\u30d7\u30eb\u304b\u3064\u5b89\u5168\u306b\u904b\u7528\u3059\u308b\u305f\u3081\u306b\u4e0d\u53ef\u6b20\u3067\u3059\u3002\n<\/p>\n<p>\n    <strong>JWT<\/strong>\u3092\u6838\u3068\u3057\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u306b**BCrypt**\u3001\u7f72\u540d\u306b**RS256**\u3001\u305d\u3057\u3066**\u30ea\u30d5\u30ec\u30c3\u30b7\u30e5\u30c8\u30fc\u30af\u30f3**\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001\u5805\u7262\u3067\u30b9\u30b1\u30fc\u30e9\u30d6\u30eb\u306a\u8a8d\u8a3c\u30b7\u30b9\u30c6\u30e0\u3092\u69cb\u7bc9\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u8a2d\u8a08\u306f\u3001\u958b\u767a\u52b9\u7387\u3092\u5927\u5e45\u306b\u6539\u5584\u3057\u3001\u5c06\u6765\u7684\u306a\u30b5\u30fc\u30d3\u30b9\u62e1\u5f35\u306b\u3082\u67d4\u8edf\u306b\u5bfe\u5fdc\u3067\u304d\u308b\u5f37\u56fa\u306a\u57fa\u76e4\u3068\u306a\u308b\u3067\u3057\u3087\u3046\u3002\n<\/p>\n<hr>\n<p>\n    \u3053\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u3001\u3042\u306a\u305f\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306bSSO\u8a8d\u8a3c\u30b5\u30fc\u30d3\u30b9\u3092\u5b9f\u88c5\u3057\u3001\u958b\u767a\u306e\u672a\u6765\u3092\u5207\u308a\u62d3\u3044\u3066\u304f\u3060\u3055\u3044\u3002\n<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u300c\u8907\u6570\u306eWeb\u30a2\u30d7\u30ea\u3092\u958b\u767a\u3057\u3066\u3044\u308b\u304c\u3001\u30ed\u30b0\u30a4\u30f3\u6a5f\u80fd\u304c\u30d0\u30e9\u30d0\u30e9\u3067\u7ba1\u7406\u304c\u5927\u5909\u2026\u300d \u3042\u306a\u305f\u306f\u4eca\u3001\u305d\u3093\u306a\u8ab2\u984c\u306b\u76f4\u9762\u3057\u3066\u3044\u307e\u305b\u3093\u304b\uff1f \u30e6\u30fc\u30b6\u30fc\u306f\u30a2\u30d7\u30ea\u3054\u3068\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u899a\u3048\u308b\u5fc5\u8981\u304c\u3042\u308a\u3001\u958b\u767a\u8005\u306f\u5404\u30a2\u30d7\u30ea\u306b\u8a8d\u8a3c\u30ed\u30b8\u30c3\u30af\u3092\u5b9f\u88c5\u3057\u306a\u3051\u308c&hellip;<\/p>\n","protected":false},"author":1,"featured_media":329,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-324","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-7"],"_links":{"self":[{"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=324"}],"version-history":[{"count":4,"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/324\/revisions"}],"predecessor-version":[{"id":328,"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/324\/revisions\/328"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/329"}],"wp:attachment":[{"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}