Integrate Apache Shiro security library with Dropwizard-based JAX-RS application

I am trying to modify Dropwizard to support Shiro.

I read the documentation and am a little puzzled. I would like to use Shiro in conjunction with login authentication and Apache Shiro annotations. I think I need to use Jersey filters to support Shiro.

Is this the right way to support Shiro annotations in Jersey instead of the classic Shiro Filter approach?

Since Jersey filters have decent access to annotated resources, it seems to me that annotations should be used for me.

I rather do not use the AOP approach, and it would be really cool to integrate on the fly with JAX-RS as a separate module.

+4
source share
1 answer

Someone has already created a solution for your request.

Shiro with Jersey.

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

Syro for Dropwizard https://github.com/javajack/shiro-jdbi-realm

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

+4
source

Source: https://habr.com/ru/post/1445936/


All Articles