Giter Site home page Giter Site logo

shiro-learning's Introduction

Shiro-Learning

个人对于Shrio的学习以及框架源码的分析

Shiro认证过程分析

1.Subject(DelegatingSubject)-->SecurityManger(DefaultSecurityManager) Subject委托底层的SecurityManger来做具体的认证处理

2.DefaultSecurityManager底层维护了一个认证器(Authenticator) SecurityManager又是通过自己维护的认证器来做认证(具体实现为ModularRealmsAuthenticator,它管理着一组List realms)

3.ModularRealmsAuthenticator迭代底层的每一个Realm来做具体的认证操作,返回认证信息(AuthenticationInfo),如果配置了多个Realm,那么还会使用 AuthenticatingStrategy来做策略的判断,策略只是对每一个Realm认证的结果做了一个汇总,然后返回。

Shiro授权过程分析

权限模型分析

将资源分成菜单和按钮两种

  • 如果具备某个访问某个按钮资源的权限(比如添加),但是不具备读权限,菜单依旧会显示。
  • 如果用户具备访问某个按钮资源的权限,但是不具备访问菜单资源的权限,菜单不显示。

shiro-learning's People

Contributors

plx927 avatar panlingxiao avatar

Watchers

James Cloos avatar  avatar

Forkers

lino68

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.