在没有 smallrye-jwt 的情况下,在带有自定义 JWT 验证的 Quarkus 中使用 @RolesAllowed

Use of @RolesAllowed in Quarkus with custom JWT validation, without smallrye-jwt

我需要在没有 smallrye-jwt 的情况下使用 @RolesAllowed,因为该项目使用在 JWE 内部签名的 JWT。我们有一个将从过滤器调用的端点。

但是如果我删除 smallrye-jwt 依赖项,@RolesAllowed 注释将不再有效。

如果没有 smallrye-jwt,如何在 Quarkus 中使用 @RolesAllowed?

我找到了以下使用@RolesAllowed 的指南:https://howtodoinjava.com/resteasy/resteasy-containerrequestfilter-example/