My impression is that DevSecurityModule
is meant as a drop-in replacement of SecurityModule
. If that's the case, then why not just install DevSecurityModule
instead of SecurityModule
in your development binary, and vice versa for production?
Override ShiroWebModule filter and realm
Question
I am using Apache Shiro to secure my jesey-guice application. I have defined a SecurityModule by extending ShiroWebModule as described in the example.
For non-production environment, I have different security requirements, so I have defined DevSecurityModle with a different (and less restrictive) set of filters. I was hoping to do something in the line of:
Modules.override (new SecurityModule()).with (new DevSecurityModule());
However, I realized that Modules.override only override bindings, and since both bindRealm() or addFilterChain() are not bindings, I am simply adding new security realm and filters.
How how can this be done?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow