<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>JWT - 标签 | 飞污熊小站</title><link>https://xiongneng.me/tags/jwt/</link><description>飞污熊小站</description><generator>Hugo 0.166.0 &amp; FixIt v0.4.6-20260512073637-464c4659</generator><language>zh-CN</language><managingEditor>yidao620@163.com (XiongNeng)</managingEditor><webMaster>yidao620@163.com (XiongNeng)</webMaster><copyright>XiongNeng</copyright><lastBuildDate>Fri, 25 Sep 2026 02:16:47 +0000</lastBuildDate><atom:link href="https://xiongneng.me/tags/jwt/index.xml" rel="self" type="application/rss+xml"/><item><title>SpringBoot4系列19 - 使用OAuth2与JWT接口认证</title><link>https://xiongneng.me/posts/java/springboot/sb4-oauth2/</link><pubDate>Sun, 20 Sep 2026 22:00:00 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb4-oauth2/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;一家公司里，订单服务背后站着三个内部系统：物流系统查订单安排发货，报表系统拉数据做统计，对账系统定时核对金额。最早的接法是三方约定一个共享密码，每个系统调接口时都带上它。我接手这种系统时最怕的就是换密码：三个系统的配置、两份脚本、一个定时任务挨个改，改漏一个就出一批 401 告警。共享密码的要害在于「一台机器一个身份、一种权限」没有任何地方可以表达，全部调用方共用同一份凭据。OAuth2 的 client_credentials 授权模式解决的正是这件事：每个系统一个 client，一个 client 一组 scope，凭据过期自动换，接口侧只认 JWT 令牌本身。&lt;/p&gt;</description></item></channel></rss>