shiro + springBoot 整合 JWT

JWTUtil 我們利用 JWT 的工具類來生成我們的 token,這個工具類主要有生成 token 和 校驗 token 兩個方法 生成 token 時,指定 token 過期時間 EXPIRE_TIME和簽名密鑰 SECRET,然後將 date 和 username 寫入 token 中,並使用帶有密鑰的 HS256 簽名算法進行簽名 Date date = new Date(System.c
相關文章
相關標籤/搜索