简体   繁体   English

在Jetty / Jersey中,我对自定义身份验证标头使用了过滤器,以映射到用户角色。 如何使用ReSTlet完成此操作?

[英]In Jetty/Jersey I use a filter for custom auth headers to get mapped to user roles. How do I accomplish this using ReSTlet?

In the current version of my application, I have a Servlet filter which looks for custom headers and maps those headers into role information which is then passed to my Jersey JAX-RS servlet. 在我的应用程序的当前版本中,我有一个Servlet过滤器,该过滤器查找自定义标头并将这些标头映射到角色信息,然后将其传递到我的Jersey JAX-RS Servlet。 I would like to implement a compatible solution using ReSTlet, but Guards do not seem to be able to do what I want and RoleChecker is deprecated. 我想使用ReSTlet实现一个兼容的解决方案,但是Guards似乎无法执行我想要的操作,因此不推荐使用RoleChecker。 Anyone have any thoughts? 有人有什么想法吗?

I think the Jax-rs extension lacks the support of the @Context annotation. 我认为Jax-rs扩展缺少@Context注释的支持。 An issue is opened: https://github.com/restlet/restlet-framework-java/issues/532 一个问题被打开了: https : //github.com/restlet/restlet-framework-java/issues/532

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 用户具有角色角色时应如何呈现视图。 蛋糕 - how should I render views when users habtm roles. cake 如何有效地处理用户角色? - How do I handle user roles effectively? 我正在创建具有角色的用户登录管理系统。 当我运行命令`$ php artisan db:seed`时,出现如下错误 - I am creating user login management system with roles. I am getting error as, below when I run the command `$ php artisan db:seed` 使用Vue-Auth,如何从后端的令牌中获取用户ID? - Using Vue-Auth, how do I get the user id from the token in the backend? 如何在Oracle数据库中获取所有仅应用程序或自定义角色? - How do I get all of the application-only or custom roles in an Oracle database? laravel 5.4如何通过用户模型获取当前用户? 和Auth :: user()不起作用 - laravel 5.4 How do I get current user through User model? and Auth::user() dosen't work 如何使用Auth 0从JWT接收电子邮件 - How do I get email from JWT using Auth 0 如何让 ASP.NET 角色使用 MySQL? - How do I make ASP.NET Roles use MySQL? Laravel 5 new auth:获取当前用户以及如何实现角色? - Laravel 5 new auth: Get current user and how to implement roles? Django:如何使用 auth_user 表的 is_active? - Django: How do I use is_active of auth_user table?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM