如何使用 jwt 公钥在 Spring Boot 中验证承载访问令牌

San*_*ari 5 spring spring-security spring-boot spring-security-oauth2 spring-security-rest

我有使用客户端 ID 和密钥从 websec 生成的访问令牌。

我的项目 app.properties 有 jwt 公钥。

我正在开发 Rest api ,调用 Rest api 将提供我想使用 jwt 公钥进行验证的 Bear 令牌(生成的)。

但是Spring Security内部使用内存令牌验证器并返回无效令牌。

那么我如何使用 jwt 公钥来验证不记名令牌。

或者说我在这里缺乏一些理解。