将Apache Shiro Security Library与基于Dropwizard的JAX-RS应用程序集成 [英] Integrate Apache Shiro Security Library with Dropwizard based JAX-RS application

查看:235
本文介绍了将Apache Shiro Security Library与基于Dropwizard的JAX-RS应用程序集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试改变Dropwizard以支持Shiro。

I am trying to change Dropwizard to support Shiro.

我已经阅读了文档并且有点困惑。我想将Shiro与表单登录身份验证和Apache Shiro Annotations结合使用。我认为我需要使用Jersey Filters来支持Shiro。

I have read documentation and am little puzzled. I would like to utilize Shiro in conjunction with form login authentication and Apache Shiro Annotations. I think that I need to use Jersey Filters to support Shiro.

这是支持Jersey的Shiro注释而不是经典的Shiro Filter方法的正确方法吗?

Is this the correct way to support Shiro annotations at Jersey instead of classic Shiro Filter approach?

由于Jersey Filters可以很好地访问带注释的资源,因此对我来说使用注释似乎是完美的。

Since Jersey Filters have decent access to resources with annotations, it seems perfect for me to use annotations.

我宁愿不使用AOP方法,与JAX-RS作为一个独立的模块进行动态集成真的很棒。

I rather not use the AOP approach, and It could be really great to have on the fly integration with JAX-RS as a separated module.

推荐答案

有人已经为你要问的问题创建了一个解决方案。

Someone has already created a solution for what you are asking.

Shiro与泽西岛。

Shiro with Jersey.

https://github.com/javajack/ shiro-jersey

Shiro For Dropwizard
https://github.com/javajack/shiro-jdbi-realm

Shiro For Dropwizard https://github.com/javajack/shiro-jdbi-realm

Dropwizard Shiro Budle示例
https://github.com/javajack/dw-shiro-bundle

Dropwizard Shiro Budle Example https://github.com/javajack/dw-shiro-bundle

这篇关于将Apache Shiro Security Library与基于Dropwizard的JAX-RS应用程序集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆