美文网首页
shiro——三

shiro——三

作者: 乐百事52淑熙 | 来源:发表于2017-05-23 09:50 被阅读0次

    说一下shiro的其他功能,这些功能只是为了更好地实现《shiro——二中的核心功能》。

    web support(web 支持):

    过滤器代码如下:

    这样,无论部署环境如何都会保持一致性。

    过滤器链:

    web 会话管理:

    使用我们习惯的servlet容器会话。当我们调用subject.getsession()和subject.getsession(boolean)时,返回Servlet容器的HttpSession 实例。

    当使用原生会话时,也就是HttpServletRequest或者HttpSession时,不需要重写原生会话API,而是可以直接使用shiroAPI,shiro可以直接委托给他的内部原生会话。

    附加特性:

    Threading and Concurrency support for maintaining Subjects across threads (Executor and ExecutorService support)(线程和并发支持在线程之间维护主题(执行器和执行器方法支持))

    Callable and Runnable support for executing logic as a specific Subject(可调用和可运行的对作为特定主题执行逻辑的支持)

    “Run As” support for assuming the identity of another Subject (e.g. useful in administrative applications)(“作为”支持假设另一个主题的标识(例如,在管理应用程序中有用))

    Test harness support, making it very easy to have full testing of Shiro secured-code in unit and integration tests(测试工具支持,使得在单元测试和集成测试中对Shiro的安全代码进行全面测试非常容易。)

    目前弱点:

    1、虚拟机级别的安全问题

    2、用户多级别登陆问题

    3、域的写操作问题

    推荐微信公众号【排骨肉段】,记录日常的美好。

    相关文章

      网友评论

          本文标题:shiro——三

          本文链接:https://www.haomeiwen.com/subject/iptixxtx.html