使用 AOP、Guice 和新的 RequestFactories 进行身份验证

发布于 2024-10-06 09:25:39 字数 257 浏览 0 评论 0原文

我想使用新的 RequestFactories 和新方法通过 Guice 进行 AOP 来进行身份验证。

我想在 JPA 实体中有一个 RequestFactory 请求方法,例如

findCustomer(int id) 我可以用 @NeedsAuthorization(rights=Rigths.ADMIN) 进行注释,

这只是一个例子,但我经验不足在这个领域,如果有一个很好的教程来展示这种可能性,那就太好了。也许基于 HttpSession。

I would like to use the new RequestFactories and the new approach to do AOP with Guice to do the Authentication.

I would like to have for example a RequestFactory Request method in a JPA Entity for example

findCustomer(int id) which i can anotate for example with @NeedsAuthorization(rights=Rigths.ADMIN)

This is just an example, but i am not so experienced in this field and it would be nice if there is an nice tutorial which shows such a possibility. Maybe HttpSession based.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

迷路的信 2024-10-13 09:25:39

想给自己一个答案。经过更长时间的研究,我找到了一种在这个软件架构示例中使用 Guice 和 RequestFactory 的方法: https://github .com/mgenov/injecting-request-factory

在这个项目中,我看到了 AOP 授权的示例:http://snippets.dzone.com/posts/show/11587

在 GWT 的 dynatableRF 示例中,我看到了如何在请求工厂级别进行授权(使用 AuthFilter)

Want to give myself an answer. After longer research i find a way to use Guice with RequestFactory in this software architecture example: https://github.com/mgenov/injecting-request-factory

In this project i saw an example of Authorizaton wit AOP: http://snippets.dzone.com/posts/show/11587

In the dynatableRF example of GWT i saw how to do the Authorization on Request Factory level (with AuthFilter)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文