随笔分类 - Shiro
摘要:涉及的SessionManager AbstractNativeSessionManager:Session管理器具备创建和查询Session的行为,但是其本身没有这些具体的职能,只能抽象化,由其子类具体执行 DefaultSessionManager:默认的Session管理器具备了Session
阅读全文
摘要:AbstractNativeSessionManager具体实现了SessionManager的行为和NativeSessionManager的行为 具备了Session监听器,session创建时监听器起作用 具体实现SessionManager的行为之 Session start(Session
阅读全文
摘要:最抽象功能也最基础的Session管理器,只包含了存取Session的过期时间
阅读全文
摘要:SessionsSecurityManager SessionsSecurityManager的具体行为就是实现SessionManager的抽象行为 SessionManager SessionsSecurityManager内置了一个SessionManager会员管理器 其设计理念是实现会员管
阅读全文
摘要:SessionManager 其定义的行为:创建Session、获得Session AbstractSessionManager 该类是将关乎于session的共同点抽出来如过期时间 NativeSessionManager 其定义的行为:获得创建Session时的时间、判断Session是否有效、
阅读全文
摘要:Demo 自定义Runnable,类似于定时任务
阅读全文
摘要:概要 Realm是工兵角色,需要SecurityManager、CacheManager、Authenticator、Authorizer等 CachingSecurityManager的注入之后 RealmSecurityManager的注入之后 AuthenticatingSecurityMan
阅读全文
摘要:spring-shiro.xml文件配置 缓存原理 CachingSecurityManager 注入缓存管理器到安全管理器中,还需要将缓存管理器注入到领域中 RealmSecurityManager 将缓存管理器注入到领域中,存入取出缓存内容均有领域具体实现 DefaultSecurityMana
阅读全文
摘要:概要 授权安全管理器继承了授权器,拥有了授权的各种行为,又使用授权器具体实现授权的各种行为。 Authorizer授权器 AuthorizingSecurityManager授权安全管理器 ModularRealmAuthorizer
阅读全文
摘要:概要 实现权限验证行为的前提需要实现横切拦截设计(Spring的AOP)参考:https://www.cnblogs.com/BINGJJFLY/p/9066524.html spring-shiro.xml配置文件的配置 AuthorizationAttributeSourceAdvisor Ao
阅读全文
摘要:定义上下文行为,要继承Map 定义MapContext上下文,定义备份Map,实现备份Map的存取等关乎map的行为,实现Map 定义默认的上下文实现类,继承MapContext上下文,具体实现上下文 demo
阅读全文
摘要:DefaultSecurityManager DefaultSecurityManager主要实现了SecurityManager的行为login()、logout()、createSubject() DelegatingSubject的login() Subject执行认证操作(成功为Subjec
阅读全文
摘要:SecurityManager SecurityManager继承了Authenticator(认证器)、Authorizer(授权器)、SessionManager(会话管理器),他所拥有的行为: 其本身特有的行为: 扩展拥有的行为: Authenticator顶端接口 负责认证工作,使用Real
阅读全文
摘要:顶端抽象类AnnotationHandler 该类是关乎注解的处理类,只涉及到注解的一些行为,符合面向对象的原则 承上启下抽象类AuthorizingAnnotationHandler 该类是权限注解处理器类,涉及到注解的行为所以继承了AnnotationHandler,又因为涉及到权限判断所以定义
阅读全文
摘要:AuthorizingAnnotationMethodInterceptor AnnotationMethodInterceptor MethodInterceptorSupport 提供用户登入的信息和用户所拥有的权限信息,这样其子类则具备了登入会员的信息以判断会员是否具有权限 RoleAnnot
阅读全文
摘要:AuthorizationAttributeSourceAdvisor切入点 AopAllianceAnnotationsAuthorizingMethodInterceptor方法拦截器 AuthorizingMethodInterceptor权限方法拦截器,很抽象 AnnotationsAuth
阅读全文
摘要:概要 创建一个切入点PointcutAdvisor继承Spring的StaticMethodMatcherPointcutAdvisor 创建一个MethodInterceptor方法拦截器org.aopalliance.intercept.MethodInvocation setAdvice(Me
阅读全文
摘要:Realm Authentication 领域认证 Supports AuthenticationTokens 支持Token Realm认证开始之前,Realm会调用他的supports方法,如果返回true才会进行Handling supported AuthenticationTokens即g
阅读全文
摘要:If Else授权 角色检查 角色断言 权限检查 基于Permission对象的权限检查 基于字符串的权限检查 Shiro的默认org.apache.shiro.authz.permission.WildcardPermission实现定义的特殊冒号分隔格式 权限断言 注解授权 @RequiresA
阅读全文
摘要:Authenticating Subjects 认证用户 认证步骤 认证分三步:1、收集用户(Subject)基本信息(principal)和认证信息(credential); 2、提交用户(Subject)基本信息(principal)和认证信息(credential); 3、认证结果信息处理。
阅读全文

浙公网安备 33010602011771号