
Shiro
文章平均质量分 72
「已注销」
我就是我,是颜色不一样的烟火,我看我自己都冒火~~~
展开
-
shiro讲解之 Authentication
shiro讲解之 Authentication本章节将详细讲解Shiro的 Authentication 流程。概念官方定义:Authentication: Sometimes referred to as ‘login’, this is the act of proving a user is who they say they are.通常而言:Shiro 认证更大程度上特指用户登录并对用原创 2017-10-27 11:04:16 · 796 阅读 · 0 评论 -
shiro讲解之 SpringMVC 集成Shiro
shiro讲解之 SpringMVC 集成Shiro本章节将通过实例来学习下SpringMVC+Spring+Shiro如何集成并用一个精简的例子说明。整合新建一个完整的Spring+SpringMVC 框架关于Spring整个SpringMVC的例子已在SpingMVC模块有分享,可移步至SpringMVC。项目目录整合 Shiro 步骤下载 Shiro 及相关jar包pom.xml新增以下原创 2017-10-26 16:35:37 · 296 阅读 · 0 评论 -
shiro 之 Shiro 标签
shiro 之 Shiro 标签本节我们将学习一下Shiro 的标签。Shiro 提供了 JSTL 标签用于在 JSP 页面进行权限控制,如根据登录用户显示相应的页面按钮。在使用Shiro 的标签之前我们需要引入Shiro Tag:<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>guest 标签:用户没有身份验证时显示相应原创 2017-11-11 11:22:17 · 382 阅读 · 0 评论 -
shiro 之 封装filterChainDefinitionMap
shiro 之 封装 filterChainDefinitionMap在我们之前的学习中有接触过 Shiro 的 DefaultFilter 在整个 Shiro 架构中的作用便是用来拦截所有请求。在 Shiro DefaultFilter 中我们配置了 filterChainDefinitions 属性。filterChainDefinitions 的作用便是对所有被Shiro 拦截的请求做声明,下原创 2017-11-11 10:36:20 · 21285 阅读 · 1 评论 -
shiro之 分布式Cache共享之 Realm共享
shiro之 分布式Cache共享之 Realm共享在我们之前的学习中我们知道了 Shiro 的核心功能之Cache 主要两个应用场景就是 Session 和 Realm。即Session和认证授权信息会被写入 Cache。在分布式的系统中我们如果使用了 Shiro。 那么我们就不得不考虑一件事:那就是Cache 共享(特指 Session 和 Realm 共享)。这一节我们讲学习一下 Shiro原创 2017-11-10 17:17:47 · 615 阅读 · 0 评论 -
shiro讲解之 入门
本系列我们将一起学习一下Shiro。概念WhatShiro 可以非常容易的开发出足够好的应用,其不仅可以用在JavaSE 环境,也可以用在 JavaEE 环境。How认证、授权、加密、会话管理、与Web 集成、缓存等。where下载:http://shiro.apache.org/功能简介基本功能点官网地址:http://shiro.apache.org/introduction.html原创 2017-10-24 16:49:01 · 372 阅读 · 0 评论 -
shiro 之 Cache
shiro 之 Cache本节将学习以一下Shiro 的核心功能之一 Cache。关于Shiro 的 Cache 我再次先声明一下下:Shiro 的Cache 的服务范围一般在Shiro 的服务内。关于缓存我们之前有学习过Redis,在一些Application中我们也是用到了 Redis作为缓存来处理数据。因而我们可以得出一个结论:其他缓存可以作为 Shiro 的缓存代理,但是Shiro 自身的缓原创 2017-11-09 17:25:28 · 478 阅读 · 0 评论 -
shiro 之 Session Management
shiro 之 Session Management本节我们将学习一下 Shiro 的 Session Management 即 Shiro 提供的核心功能之一: 会话管理。概念Session通常而言会话指的是用户访问应用时保持的连接关系,在多次交互中应用能够识别出当前访问的用户是谁,且可以在多次交互中保存一些数据。如访问一些网站时登录成功后,网站可以记住用户,且在退出之前都可以识别当前用户是谁。原创 2017-11-09 16:12:07 · 1316 阅读 · 0 评论 -
shiro讲解 之 Authorization (一)
shiro讲解之 多Realm 之 Authorization(一)本节我们将学习一下 Shiro 的 Authorization(授权)。官方文档The Authorizer is the component responsible determining users’ access control in the application. It is the mechanism that ult原创 2017-10-30 14:27:11 · 636 阅读 · 0 评论 -
shiro讲解之 多Realm 之 Authorization
shiro讲解之 多Realm 之 Authorization在本节之前我们学习了Shiro 的 多Realm 和 Authorization,现在我们将学习一下Shiro 的多 Realm Authorization。实例多 Realm 的配置(参考 shiro讲解之 多Realm 之 Authentication)Realms 这里我们定义两个 Realm 分别为 shiroRealm 和原创 2017-10-30 15:16:09 · 884 阅读 · 0 评论 -
shiro讲解之 多Realm 之 Authentication
shiro讲解之 多Realm本章节将详细讲解 Shiro 多 Realm 认证以、多 Realm 配置以及多 Realm 认证策略。实例首先我们以我们之前搭建的Spring + SpringMVC + Shiro 的基本框架为例子,然后进行多 Realm 配置。多Realm 的实现Realms 代码 为了直观体提现多Realm 认证策略,我们再次设定 ShiroRealm 中的认证能够顺利通原创 2017-10-28 15:53:16 · 2163 阅读 · 0 评论 -
shiro讲解 之 Authentication-Authorization小结
shiro讲解 之 Authentication-Authorization小结本节中我们将总结一下在我们的实际项目中 Shiro 的Authentication 和 Authorization该怎样去设计。在实际的项目需求中角色的判定和赋予,权限的判定与赋予应该都是模式化的。在设计环节我们只需要关注Subject-Role-Permission-Resource 之间的关系即可,在使用环节我们只要原创 2017-11-07 17:33:36 · 429 阅读 · 0 评论 -
shiro讲解 之 Authorization (三)
shiro讲解 之 Authorization (三)在之前的章节中我们学习了Shiro 的授权方式和实现。就Shiro 的 授权粒度而言,我们之前学习都是Shiro 的粗粒度。在授权粒度上 Shiro 做的非常好,即我们既可以实现粗粒度的授权(一般指 Authorization)和细粒度的鉴权(Permission)。概念一定程度上而言 Shiro 的 Permisssion 指的是Shiro 对原创 2017-10-31 11:23:27 · 556 阅读 · 0 评论 -
shiro讲解 之 Authorization (二)
shiro讲解 之 Authorization (二)本章我们将深度的学习 Shiro 的 Authorization。在之前的章节我们有学习过 Shiro 的基本 Authorization 即在 Realm 做Subject 的授权,在SpringContext中配置 Shiro Authorizartion 的 DefaultFilter。DefaultFilter什么是 DefaultFi原创 2017-10-30 17:40:27 · 252 阅读 · 0 评论 -
shiro讲解之 Realm
shiro讲解之 Realm本章节我们将详细讲解一下Shiro的 Realm。概念官方文档As mentioned above, Realms act as the ‘bridge’ or ‘connector’ between Shiro and your application’s security data. When it comes time to actually interact w原创 2017-10-28 11:40:31 · 840 阅读 · 0 评论 -
shiro讲解之 Cryptography
shiro讲解之 Cryptography 本章节将详细学习一下Shiro 的Cryptography 以及其在Application中的用处。概念官方文档Cryptography is a natural addition to an enterprise security framework. Shiro’s crypto package contains easy-to-use and un原创 2017-10-27 16:25:38 · 1096 阅读 · 0 评论 -
shiro讲解之 Shiro Filter
shiro讲解之 Shiro Filter本章节将详细说明Shiro Filter。概念什么是Shiro FilterShiro 提供了与 Web 集成的支持,其通过一个ShiroFilter 入口来拦截需要安全控制的URL,然后进行相应的控制。ShiroFilter 类似于如 Strut2/SpringMVC 这种web 框架的前端控制器,是安全控制的入口点,其负责读取配置(如ini 配置文件原创 2017-10-26 17:02:52 · 1229 阅读 · 0 评论