Integrate Apache Shiro Security Library with Dropwizard based JAX-RS application

心已入冬 提交于 2019-12-04 08:45:10

问题


I am trying to change Dropwizard to support 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.

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

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

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.


回答1:


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

Shiro with Jersey.

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

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

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



来源:https://stackoverflow.com/questions/13374919/integrate-apache-shiro-security-library-with-dropwizard-based-jax-rs-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!