Easy way to use Secure module (or similar) on all controllers in Play?

谁说胖子不能爱 提交于 2019-12-11 02:18:00

问题


I'd like to know if there's a way I can tell Play to use the Secure module for every controller, without having to add With(Secure.class) to all my controllers or making all my controllers extend a single class. Ideas anyone?


回答1:


Yes you can intercept every-request with a play-plugin. Just have a look on modules/docviewer. It's very easy to implement. At the moment I'm working on a security-module where everything is forbidden as a default.



来源:https://stackoverflow.com/questions/4597766/easy-way-to-use-secure-module-or-similar-on-all-controllers-in-play

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