Microprofile JWT web.xml returns 200 instead of 401
我正在开发一个小型后端。为了保护我想使用 JWT 的东西。
我的技术栈是:Payara
您的 JAX-RS 配置类缺少用于指定应用程序中所有可用角色的 @DeclareRoles({“mysimplerole”,”USER” }) 注释。
1 2 3 4 5 6
|
@ApplicationPath (“/resources”)
@LoginConfig (authMethod =“MP-JWT”)
@DeclareRoles ({“mysimplerole”, “USER” })
public class JAXRSConfiguration extends Application {
}
|
来源:https://www.codenong.com/60583971/
微信公众号
手机浏览(小程序)
Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(): Failed to enable crypto in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_10062.jpg): failed to open stream: operation failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57