├── .gitattributes ├── .github └── FUNDING.yml ├── .gitignore ├── .readme.md.html ├── ConfigTemplate ├── en │ ├── RBAC_MySQL.sql │ ├── ehcache.xml │ ├── shiro.ini │ ├── spring-shiro-redis.xml │ ├── spring-shiro.xml │ └── web.xml └── zh_CN │ ├── RBAC_MySQL.sql │ ├── ehcache.xml │ ├── shiro.ini │ ├── spring-shiro-redis.xml │ ├── spring-shiro.xml │ └── web.xml ├── LICENSE.txt ├── LockLogin Management └── locklogin │ └── admin.jsp ├── doc ├── .readme-en.md.html ├── .readme-zh-CN.md.html ├── images │ ├── locklogin1.png │ ├── locklogin2.png │ ├── locklogin3.png │ ├── locklogin4.png │ ├── locklogin5.png │ ├── rbca-en.png │ └── rbca.png ├── readme-en.md └── readme-zh-CN.md ├── libs ├── easyshiro-2.6.0-RELEASE-javadoc.jar ├── easyshiro-2.6.0-RELEASE-sources.jar └── easyshiro-2.6.0-RELEASE.jar └── readme.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: ['http://www.easyproject.cn/donation'] 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear in the root of a volume 35 | .DocumentRevisions-V100 36 | .fseventsd 37 | .Spotlight-V100 38 | .TemporaryItems 39 | .Trashes 40 | .VolumeIcon.icns 41 | 42 | # Directories potentially created on remote AFP share 43 | .AppleDB 44 | .AppleDesktop 45 | Network Trash Folder 46 | Temporary Items 47 | .apdisk 48 | -------------------------------------------------------------------------------- /.readme.md.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | R:\Cloud\360Cloud\Easy Project\EasyProject\项目\EasyShiro\easyshiro\github\.readme.md.html 6 | 7 | 8 | 621 | 622 | 623 | 638 | 639 | 640 | 641 | 642 |

EasyShiro

643 |
644 |

EasyShiro 是一个基于 Shiro 的安全扩展组件。为基于数据库权限管理和 Web URL 授权 的 RBAC(Role Based Access Control) Web 权限模型,提供通用的 Shiro 安全管理支持,以及更加丰富强大的功能选项。

645 |

EasyShiro is a security extension components based Shiro. Based on the RBAC (Role Based Access Control) Web permission model based on database rights management and Web URL authorization, provides general Shiro security management support, as well as richer and more powerful function options.

646 |

Support version: Shiro 1.2.X, Shiro 1.3.X, Shiro 1.4.X

647 |

Featuter/特点

648 | 651 |
    652 |
  1. 支持基于基于数据库权限管理和 Web URL 授权的 RBAC 权限管理

  2. 653 |
  3. 增强简化的 Shiro 统一组件支持。提供通用的 验证码自动登录登录锁定错误消息配置拦截器Ajax 响应 等等支持

  4. 654 |
  5. 配置简单,简化安全集成,减少 Shiro 的复杂性。提供了完整的通用配置模板(shiro.ini, spring-shiro.xml)仅需加入 jar 包,按需求调整部分配置选项,即可完成集成,享受完整的 Shiro 支持

  6. 655 |
  7. 基于 UserIPLockLogin 登录锁定功能,并提供登录锁定管理系统 LockLoginManagement

  8. 656 |
657 | 660 |
    661 |
  1. Support RBAC rights management based on database rights management and Web URL authorizations

  2. 662 |
  3. Enhanced simplified Shiro unified component support. Provide common CAPTCHA, Automatic login, Login lock, Error message configuration, Interceptor, Ajax response, etc. support

  4. 663 |
  5. Simplifies configuration and simplifies security integration, reducing Shiro's complexity. Just add the jar package and adjust some of the configuration( Shiro.ini,spring-shiro.xml) options as required to complete the integration and enjoy the complete Shiro stand by

  6. 664 |
  7. LockLogin login lock based on User andIP and provides login lock management system LockLoginManagement

  8. 665 |
666 |

LockLogin Management/登录锁定管理系统

667 |

支持基于 UserIP 的锁定控制,及基于 IP 的验证码是否显示控制。

668 |

Supports lock control based on User and IP, and IP-based whether CAPTCHA displaycontrol.

669 |

LockLogin

670 |

LockLogin

671 |

LockLogin

672 |

LockLogin

673 |

LockLogin

674 |

Maven

675 |
676 |
<dependency>
677 |     <groupId>cn.easyproject</groupId>
678 |     <artifactId>easyshiro</artifactId>
679 |     <version>2.6.0-RELEASE</version>
680 | </dependency>
681 | <!-- EasyShiro default dependency shiro version 1.2.6, you can change shiro version, like these: -->
682 | <!--
683 | <dependency>
684 |     <groupId>org.apache.shiro</groupId>
685 |     <artifactId>shiro-core</artifactId>
686 |     <version>${shiro.version}</version>
687 | </dependency>
688 | <dependency>
689 |     <groupId>org.apache.shiro</groupId>
690 |     <artifactId>shiro-web</artifactId>
691 |     <version>${shiro.version}</version>
692 | </dependency>
693 | <dependency>
694 |     <groupId>org.apache.shiro</groupId>
695 |     <artifactId>shiro-ehcache</artifactId>
696 |     <version>${shiro.version}</version>
697 |     <exclusions>
698 |         <exclusion>
699 |             <artifactId>ehcache-core</artifactId>
700 |             <groupId>net.sf.ehcache</groupId>
701 |         </exclusion>
702 |     </exclusions>
703 | </dependency>
704 | <dependency>
705 |     <groupId>org.apache.shiro</groupId>
706 |     <artifactId>shiro-spring</artifactId>
707 |     <version>${shiro.version}</version>
708 | </dependency>
709 | <dependency>
710 |     <groupId>org.apache.shiro</groupId>
711 |     <artifactId>shiro-cas</artifactId>
712 |     <version>${shiro.version}</version>
713 | </dependency>
714 | <dependency>
715 |     <groupId>org.apache.shiro</groupId>
716 |     <artifactId>shiro-quartz</artifactId>
717 |     <version>${shiro.version}</version>
718 | </dependency>
719 | -->
720 |
721 |

Document/文档

722 |

中文

723 |

中文说明文档

724 |

官方主页

725 |

留言评论

726 |

如果您有更好意见,建议或想法,请联系我。

727 |

English

728 |

English Readme

729 |

The official home page

730 |

Comments

731 |

If you have more comments, suggestions or ideas, please contact me.

732 |

End

733 |

Email:inthinkcolor@gmail.com

734 |

http://www.easyproject.cn

735 |

支付宝钱包扫一扫捐助:

736 |

我们相信,每个人的点滴贡献,都将是推动产生更多、更好免费开源产品的一大步。

737 |

感谢慷慨捐助,以支持服务器运行和鼓励更多社区成员。

738 |

支付宝钱包扫一扫捐助

739 |

We believe that the contribution of each bit by bit, will be driven to produce more and better free and open source products a big step.

740 |

Thank you donation to support the server running and encourage more community members.

741 |

PayPal

742 | 743 | 744 | -------------------------------------------------------------------------------- /ConfigTemplate/en/RBAC_MySQL.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Navicat MySQL Data Transfer 3 | 4 | Source Server : localhost 5 | Source Server Version : 50626 6 | Source Host : localhost:3306 7 | Source Database : easyssh 8 | 9 | Target Server Type : MYSQL 10 | Target Server Version : 50626 11 | File Encoding : 65001 12 | 13 | Date: 2015-09-09 00:57:45 14 | */ 15 | 16 | SET FOREIGN_KEY_CHECKS=0; 17 | 18 | -- ---------------------------- 19 | -- Table structure for sys_log 20 | -- ---------------------------- 21 | DROP TABLE IF EXISTS `sys_log`; 22 | CREATE TABLE `sys_log` ( 23 | `LOG_ID` int(11) NOT NULL AUTO_INCREMENT, 24 | `ACTION` varchar(500) DEFAULT NULL, 25 | `PARAMETERS` varchar(500) DEFAULT NULL, 26 | `RES` varchar(500) DEFAULT NULL, 27 | `ACCOUNT` varchar(200) DEFAULT NULL, 28 | `IP` varchar(200) DEFAULT NULL, 29 | `LOG_TIME` datetime DEFAULT CURRENT_TIMESTAMP, 30 | PRIMARY KEY (`LOG_ID`) 31 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 32 | 33 | -- ---------------------------- 34 | -- Records of sys_log 35 | -- ---------------------------- 36 | 37 | -- ---------------------------- 38 | -- Table structure for sys_menu_permission 39 | -- ---------------------------- 40 | DROP TABLE IF EXISTS `sys_menu_permission`; 41 | CREATE TABLE `sys_menu_permission` ( 42 | `MENU_PERMISSION_ID` int(11) NOT NULL AUTO_INCREMENT, 43 | `NAME` varchar(50) NOT NULL, 44 | `ACTION` varchar(500) DEFAULT NULL, 45 | `PARENT_ID` int(11) DEFAULT NULL, 46 | `SORT_ORDER` int(11) DEFAULT NULL, 47 | `ICON` varchar(50) DEFAULT NULL, 48 | `REMARK` varchar(500) DEFAULT NULL, 49 | PRIMARY KEY (`MENU_PERMISSION_ID`), 50 | KEY `FK_FK_SYS_MENU_RIGHTS_ID` (`PARENT_ID`) USING BTREE, 51 | CONSTRAINT `sys_menu_permission_ibfk_1` FOREIGN KEY (`PARENT_ID`) REFERENCES `sys_menu_permission` (`MENU_PERMISSION_ID`) 52 | ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8; 53 | 54 | -- ---------------------------- 55 | -- Records of sys_menu_permission 56 | -- ---------------------------- 57 | INSERT INTO `sys_menu_permission` VALUES ('1', 'EasySSH', 'toMain.action', null, '0', 'icon-home2', ''); 58 | INSERT INTO `sys_menu_permission` VALUES ('2', 'System', null, '1', '0', 'icon-application_view_tile', '系统维护管理,System员拥有'); 59 | INSERT INTO `sys_menu_permission` VALUES ('3', 'Users', 'toSysUser.action', '2', '0', 'icon-user', null); 60 | INSERT INTO `sys_menu_permission` VALUES ('4', 'Roles', 'toSysRole.action', '2', '1', 'icon-grade', null); 61 | INSERT INTO `sys_menu_permission` VALUES ('5', 'Menus', 'toSysMenuPermission.action', '2', '2', 'icon-menu', null); 62 | INSERT INTO `sys_menu_permission` VALUES ('6', 'Operations', 'toSysOperationPermission.action', '2', '3', 'icon-rights', null); 63 | INSERT INTO `sys_menu_permission` VALUES ('7', 'EmpManagement', null, '1', '1', 'icon-report', 'Hr'); 64 | INSERT INTO `sys_menu_permission` VALUES ('8', 'Dept', 'toDept.action', '7', '1', 'icon-group', ''); 65 | INSERT INTO `sys_menu_permission` VALUES ('9', 'Emp', 'toEmp.action', '7', '2', 'icon-id', ''); 66 | INSERT INTO `sys_menu_permission` VALUES ('10', 'Report', null, '1', '2', 'icon-chart_bar', 'Manger'); 67 | INSERT INTO `sys_menu_permission` VALUES ('11', 'Statistical', 'toReports.action', '10', '0', 'icon-chart_curve', ''); 68 | INSERT INTO `sys_menu_permission` VALUES ('13', 'Logs', 'toSysLog.action', '2', '4', 'icon-book', 'Logs'); 69 | 70 | -- ---------------------------- 71 | -- Table structure for sys_operation_permission 72 | -- ---------------------------- 73 | DROP TABLE IF EXISTS `sys_operation_permission`; 74 | CREATE TABLE `sys_operation_permission` ( 75 | `OPERATION_PERMISSION_ID` int(11) NOT NULL AUTO_INCREMENT, 76 | `MENU_PERMISSION_ID` int(11) DEFAULT NULL, 77 | `NAME` varchar(50) NOT NULL, 78 | `ACTION` varchar(500) DEFAULT NULL, 79 | `REMARK` varchar(500) DEFAULT NULL, 80 | PRIMARY KEY (`OPERATION_PERMISSION_ID`), 81 | KEY `FK_FK_SYS_OPERATION_MENU_ID` (`MENU_PERMISSION_ID`) USING BTREE, 82 | CONSTRAINT `sys_operation_permission_ibfk_1` FOREIGN KEY (`MENU_PERMISSION_ID`) REFERENCES `sys_menu_permission` (`MENU_PERMISSION_ID`) 83 | ) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8; 84 | 85 | -- ---------------------------- 86 | -- Records of sys_operation_permission 87 | -- ---------------------------- 88 | INSERT INTO `sys_operation_permission` VALUES ('37', '5', 'list menus', 'sysMenuPermission_list.action', ''); 89 | INSERT INTO `sys_operation_permission` VALUES ('38', '5', 'edit menu', 'sysMenuPermission_update.action', ''); 90 | INSERT INTO `sys_operation_permission` VALUES ('39', '5', 'delete menu', 'sysMenuPermission_delete.action', ''); 91 | INSERT INTO `sys_operation_permission` VALUES ('40', '5', 'move menu次序', 'sysMenuPermission_move.action', ''); 92 | INSERT INTO `sys_operation_permission` VALUES ('41', '5', 'add menu', 'sysMenuPermission_save.action', ''); 93 | INSERT INTO `sys_operation_permission` VALUES ('42', '6', ' menu list ', 'sysMenuPermission_list.action', ''); 94 | INSERT INTO `sys_operation_permission` VALUES ('43', '6', 'query menu operation permissions', 'sysOperationPermission_list.action', ''); 95 | INSERT INTO `sys_operation_permission` VALUES ('44', '6', 'add operation permissions', 'sysOperationPermission_save.action', ''); 96 | INSERT INTO `sys_operation_permission` VALUES ('45', '6', 'edit operation permissions', 'sysOperationPermission_update.action', ''); 97 | INSERT INTO `sys_operation_permission` VALUES ('46', '6', 'delete operation permissions', 'sysOperationPermission_delete.action', ''); 98 | INSERT INTO `sys_operation_permission` VALUES ('47', '4', 'list all roles', 'sysRole_list.action', ''); 99 | INSERT INTO `sys_operation_permission` VALUES ('48', '4', 'add role', 'sysRole_save.action,sysMenuPermission_listAll.action,sysMenuPermission_listAllForSysRole.action', ''); 100 | INSERT INTO `sys_operation_permission` VALUES ('49', '4', 'edit role', 'sysRole_update.action#sysRole_getAllPermissionsId.action,sysMenuPermission_listAll.action,sysMenuPermission_listAllForSysRole.action', 'get edit role permissions'); 101 | INSERT INTO `sys_operation_permission` VALUES ('50', '4', 'delete role', 'sysRole_delete.action', ''); 102 | INSERT INTO `sys_operation_permission` VALUES ('52', '3', 'user list', 'sysUser_list.action', ''); 103 | INSERT INTO `sys_operation_permission` VALUES ('53', '3', 'add user', 'sysUser_save.action,sysRole_all.action', ''); 104 | INSERT INTO `sys_operation_permission` VALUES ('54', '3', 'edit user', 'sysUser_update.action,sysRole_all.action', ''); 105 | INSERT INTO `sys_operation_permission` VALUES ('55', '3', 'delete user', 'sysUser_delete.action', ''); 106 | INSERT INTO `sys_operation_permission` VALUES ('56', '3', 'show add user button', 'sysUserAddBtn', 'show permission'); 107 | INSERT INTO `sys_operation_permission` VALUES ('57', '3', 'show delete user button', 'sysUserDelBtn', 'show permission'); 108 | INSERT INTO `sys_operation_permission` VALUES ('58', '3', 'show edit user button', 'sysUserUpdateBtn', 'show permission'); 109 | INSERT INTO `sys_operation_permission` VALUES ('59', '3', 'show realname', 'showRealNameColumn', 'show permission'); 110 | INSERT INTO `sys_operation_permission` VALUES ('60', '8', 'add dept', 'dept_save.action', ''); 111 | INSERT INTO `sys_operation_permission` VALUES ('61', '8', 'edit dept', 'dept_update.action', ''); 112 | INSERT INTO `sys_operation_permission` VALUES ('62', '8', 'delete dept', 'dept_delete.action', ''); 113 | INSERT INTO `sys_operation_permission` VALUES ('63', '8', 'dept list', 'dept_list.action', ''); 114 | INSERT INTO `sys_operation_permission` VALUES ('64', '8', 'show action-delete dept', 'deptDeleteShow', ''); 115 | INSERT INTO `sys_operation_permission` VALUES ('65', '9', 'add emp', 'emp_save.action,emp_allDept.action', ''); 116 | INSERT INTO `sys_operation_permission` VALUES ('66', '9', 'edit emp', 'emp_update.action,emp_allDept.action', ''); 117 | INSERT INTO `sys_operation_permission` VALUES ('67', '9', 'delete emp', 'emp_delete.action', ''); 118 | INSERT INTO `sys_operation_permission` VALUES ('68', '9', 'emp list', 'emp_list.action,emp_allDept.action', ''); 119 | INSERT INTO `sys_operation_permission` VALUES ('69', '13', 'log list', 'sysLog_list.action', ''); 120 | 121 | -- ---------------------------- 122 | -- Table structure for sys_role 123 | -- ---------------------------- 124 | DROP TABLE IF EXISTS `sys_role`; 125 | CREATE TABLE `sys_role` ( 126 | `ROLE_ID` int(11) NOT NULL AUTO_INCREMENT, 127 | `NAME` varchar(50) NOT NULL, 128 | `STATUS` int(11) DEFAULT '0', 129 | `REMARK` varchar(500) DEFAULT NULL, 130 | PRIMARY KEY (`ROLE_ID`) 131 | ) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8; 132 | 133 | -- ---------------------------- 134 | -- Records of sys_role 135 | -- ---------------------------- 136 | INSERT INTO `sys_role` VALUES ('1', 'Super Admin', '0', 'have all permissions'); 137 | INSERT INTO `sys_role` VALUES ('23', 'Administrator', '0', 'System Mangement。 \r\nDo not delete user, show user realname'); 138 | INSERT INTO `sys_role` VALUES ('24', 'HR', '0', 'Emp Management'); 139 | INSERT INTO `sys_role` VALUES ('25', 'Manager', '0', 'Show Reports'); 140 | 141 | -- ---------------------------- 142 | -- Table structure for sys_role_menu_permission 143 | -- ---------------------------- 144 | DROP TABLE IF EXISTS `sys_role_menu_permission`; 145 | CREATE TABLE `sys_role_menu_permission` ( 146 | `ROLE_ID` int(11) NOT NULL, 147 | `MENU_PERMISSION_ID` int(11) NOT NULL, 148 | PRIMARY KEY (`ROLE_ID`,`MENU_PERMISSION_ID`), 149 | KEY `FK_FK_SYS_ROLE_RIGHTS_RIGHTS_ID` (`MENU_PERMISSION_ID`) USING BTREE, 150 | CONSTRAINT `sys_role_menu_permission_ibfk_1` FOREIGN KEY (`ROLE_ID`) REFERENCES `sys_role` (`ROLE_ID`), 151 | CONSTRAINT `sys_role_menu_permission_ibfk_2` FOREIGN KEY (`MENU_PERMISSION_ID`) REFERENCES `sys_menu_permission` (`MENU_PERMISSION_ID`) 152 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 153 | 154 | -- ---------------------------- 155 | -- Records of sys_role_menu_permission 156 | -- ---------------------------- 157 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '1'); 158 | INSERT INTO `sys_role_menu_permission` VALUES ('23', '1'); 159 | INSERT INTO `sys_role_menu_permission` VALUES ('24', '1'); 160 | INSERT INTO `sys_role_menu_permission` VALUES ('25', '1'); 161 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '2'); 162 | INSERT INTO `sys_role_menu_permission` VALUES ('23', '2'); 163 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '3'); 164 | INSERT INTO `sys_role_menu_permission` VALUES ('23', '3'); 165 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '4'); 166 | INSERT INTO `sys_role_menu_permission` VALUES ('23', '4'); 167 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '5'); 168 | INSERT INTO `sys_role_menu_permission` VALUES ('23', '5'); 169 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '6'); 170 | INSERT INTO `sys_role_menu_permission` VALUES ('23', '6'); 171 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '7'); 172 | INSERT INTO `sys_role_menu_permission` VALUES ('24', '7'); 173 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '8'); 174 | INSERT INTO `sys_role_menu_permission` VALUES ('24', '8'); 175 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '9'); 176 | INSERT INTO `sys_role_menu_permission` VALUES ('24', '9'); 177 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '10'); 178 | INSERT INTO `sys_role_menu_permission` VALUES ('25', '10'); 179 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '11'); 180 | INSERT INTO `sys_role_menu_permission` VALUES ('25', '11'); 181 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '13'); 182 | INSERT INTO `sys_role_menu_permission` VALUES ('23', '13'); 183 | 184 | -- ---------------------------- 185 | -- Table structure for sys_role_operation_permission 186 | -- ---------------------------- 187 | DROP TABLE IF EXISTS `sys_role_operation_permission`; 188 | CREATE TABLE `sys_role_operation_permission` ( 189 | `ROLE_ID` int(11) NOT NULL, 190 | `OPERATION_PERMISSION_ID` int(11) NOT NULL, 191 | PRIMARY KEY (`ROLE_ID`,`OPERATION_PERMISSION_ID`), 192 | KEY `FK_FK_SYS_ROLE_OPERATION_RIGHTS_OPERATION_RIGHTS_ID` (`OPERATION_PERMISSION_ID`) USING BTREE, 193 | CONSTRAINT `sys_role_operation_permission_ibfk_1` FOREIGN KEY (`ROLE_ID`) REFERENCES `sys_role` (`ROLE_ID`), 194 | CONSTRAINT `sys_role_operation_permission_ibfk_2` FOREIGN KEY (`OPERATION_PERMISSION_ID`) REFERENCES `sys_operation_permission` (`OPERATION_PERMISSION_ID`) 195 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 196 | 197 | -- ---------------------------- 198 | -- Records of sys_role_operation_permission 199 | -- ---------------------------- 200 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '37'); 201 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '37'); 202 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '38'); 203 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '38'); 204 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '39'); 205 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '39'); 206 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '40'); 207 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '40'); 208 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '41'); 209 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '41'); 210 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '42'); 211 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '42'); 212 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '43'); 213 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '43'); 214 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '44'); 215 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '44'); 216 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '45'); 217 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '45'); 218 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '46'); 219 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '46'); 220 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '47'); 221 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '47'); 222 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '48'); 223 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '48'); 224 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '49'); 225 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '49'); 226 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '50'); 227 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '50'); 228 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '52'); 229 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '52'); 230 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '53'); 231 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '53'); 232 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '54'); 233 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '54'); 234 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '55'); 235 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '56'); 236 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '56'); 237 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '57'); 238 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '57'); 239 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '58'); 240 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '58'); 241 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '59'); 242 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '59'); 243 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '60'); 244 | INSERT INTO `sys_role_operation_permission` VALUES ('24', '60'); 245 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '61'); 246 | INSERT INTO `sys_role_operation_permission` VALUES ('24', '61'); 247 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '62'); 248 | INSERT INTO `sys_role_operation_permission` VALUES ('24', '62'); 249 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '63'); 250 | INSERT INTO `sys_role_operation_permission` VALUES ('24', '63'); 251 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '64'); 252 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '65'); 253 | INSERT INTO `sys_role_operation_permission` VALUES ('24', '65'); 254 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '66'); 255 | INSERT INTO `sys_role_operation_permission` VALUES ('24', '66'); 256 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '67'); 257 | INSERT INTO `sys_role_operation_permission` VALUES ('24', '67'); 258 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '68'); 259 | INSERT INTO `sys_role_operation_permission` VALUES ('24', '68'); 260 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '69'); 261 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '69'); 262 | 263 | -- ---------------------------- 264 | -- Table structure for sys_user 265 | -- ---------------------------- 266 | DROP TABLE IF EXISTS `sys_user`; 267 | CREATE TABLE `sys_user` ( 268 | `USER_ID` int(11) NOT NULL AUTO_INCREMENT, 269 | `NAME` varchar(50) NOT NULL, 270 | `PASSWORD` varchar(100) NOT NULL, 271 | `STATUS` int(11) DEFAULT '0', 272 | `REAL_NAME` varchar(50) DEFAULT NULL, 273 | PRIMARY KEY (`USER_ID`), 274 | UNIQUE KEY `UQ_SYS_USER_NAME` (`NAME`) 275 | ) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8; 276 | 277 | -- ---------------------------- 278 | -- Records of sys_user 279 | -- ---------------------------- 280 | INSERT INTO `sys_user` VALUES ('1', 'admin', '111111', '0', 'super admin'); 281 | INSERT INTO `sys_user` VALUES ('2', 'user', 'fffffff', '0', 'admin'); 282 | INSERT INTO `sys_user` VALUES ('35', 'hr', '111111', '0', 'hr'); 283 | INSERT INTO `sys_user` VALUES ('38', 'manager', 'aaaaaaaa', '0', 'manager'); 284 | 285 | -- ---------------------------- 286 | -- Table structure for sys_user_role 287 | -- ---------------------------- 288 | DROP TABLE IF EXISTS `sys_user_role`; 289 | CREATE TABLE `sys_user_role` ( 290 | `USER_ID` int(11) NOT NULL, 291 | `ROLE_ID` int(11) NOT NULL, 292 | PRIMARY KEY (`USER_ID`,`ROLE_ID`), 293 | KEY `FK_FK_SYS_USER_ROLE_ROLE_ID` (`ROLE_ID`) USING BTREE, 294 | CONSTRAINT `sys_user_role_ibfk_1` FOREIGN KEY (`USER_ID`) REFERENCES `sys_user` (`USER_ID`), 295 | CONSTRAINT `sys_user_role_ibfk_2` FOREIGN KEY (`ROLE_ID`) REFERENCES `sys_role` (`ROLE_ID`) 296 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 297 | 298 | -- ---------------------------- 299 | -- Records of sys_user_role 300 | -- ---------------------------- 301 | INSERT INTO `sys_user_role` VALUES ('1', '1'); 302 | INSERT INTO `sys_user_role` VALUES ('2', '23'); 303 | INSERT INTO `sys_user_role` VALUES ('35', '24'); 304 | INSERT INTO `sys_user_role` VALUES ('38', '25'); 305 | -------------------------------------------------------------------------------- /ConfigTemplate/en/ehcache.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24 | 25 | 26 | 48 | 49 | 110 | 111 | 145 | 146 | 147 | 267 | 268 | 269 | 273 | 284 | 285 | 286 | 292 | 300 | 301 | 302 | 303 | 304 | 305 | 315 | 316 | 317 | 318 | 319 | 329 | 330 | 331 | 332 | -------------------------------------------------------------------------------- /ConfigTemplate/en/shiro.ini: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------------------- 2 | # Users and their (optional) assigned roles 3 | # username = password, role1, role2, ..., roleN 4 | # ----------------------------------------------------------------------------- 5 | [users] 6 | #admin = admin123, admin 7 | #jay = 123, user 8 | #guest = guest, guest 9 | 10 | # ----------------------------------------------------------------------------- 11 | # Roles with assigned permissions 12 | # roleName = perm1, perm2, ..., permN 13 | # ----------------------------------------------------------------------------- 14 | [roles] 15 | #admin = * 16 | #user = log:* 17 | 18 | 19 | # ----------------------------------------------------------------------------- 20 | # Configuration SessionManager, Cache, Filter 21 | # myFilter = com.company.web.some.FilterImplementation 22 | # myFilter.property1 = value1 23 | # ----------------------------------------------------------------------------- 24 | 25 | [main] 26 | #- Session Manager (DEFAULT) 27 | # securityManager.sessionManager.xxxx=xxxx 28 | 29 | #-- Shiro Native SessionManager (DEFAULT) 30 | sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager 31 | # Use the configured native session manager: 32 | securityManager.sessionManager = $sessionManager 33 | 34 | #-- Session Timeout (DEFAULT) 35 | # 3,600,000 milliseconds = 1 hour 36 | securityManager.sessionManager.globalSessionTimeout = 3600000 37 | 38 | #-- Session Listeners 39 | # implement the SessionListener interface (or extend the convenience SessionListenerAdapter) 40 | # As the default SessionManager sessionListeners property is a collection, you can configure the SessionManager with one or more of your listener implementations like any other collection in shiro.ini: 41 | #aSessionListener = com.foo.my.SessionListener 42 | #anotherSessionListener = com.foo.my.OtherSessionListener 43 | #securityManager.sessionManager.sessionListeners = $aSessionListener, $anotherSessionListener, etc. 44 | 45 | 46 | #-- Custom Session IDs 47 | # The default SessionIdGenerator is a JavaUuidSessionIdGenerator, 48 | # which generates String IDs based on Java UUIDs. 49 | #sessionIdGenerator = com.my.session.SessionIdGenerator 50 | #securityManager.sessionManager.sessionDAO.sessionIdGenerator = $sessionIdGenerator 51 | 52 | 53 | #-- SessionValidationScheduler (DEFAULT) 54 | # Sessions are only validated to see 55 | # if they have been stopped or expired at the time they are accessed, 56 | # A SessionValidationScheduler is responsible for validating sessions 57 | # at a periodic rate to ensure they are cleaned up as necessary. 58 | # You can custom SessionValidationScheduler implementation class. 59 | sessionValidationScheduler = org.apache.shiro.session.mgt.ExecutorServiceSessionValidationScheduler 60 | # Default is 3,600,000 millis = 1 hour: 61 | sessionValidationScheduler.interval = 3600000 62 | securityManager.sessionManager.sessionValidationScheduler = $sessionValidationScheduler 63 | #securityManager.sessionManager.sessionValidationSchedulerEnabled = false 64 | 65 | 66 | #-- Session DAO (DEFAULT) 67 | # cache in the CacheManager should be used to store active sessions: 68 | sessionDAO = org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO 69 | securityManager.sessionManager.sessionDAO = $sessionDAO 70 | # By default, the EnterpriseCacheSessionDAO asks the CacheManager 71 | # for a Cache named "shiro-activeSessionCache" 72 | #sessionDAO.activeSessionsCacheName = ehcache_region_name 73 | 74 | 75 | #- Cache 76 | # securityManager.cacheManager 77 | 78 | #-- EhCache (DEFAULT) 79 | cacheManager = org.apache.shiro.cache.ehcache.EhCacheManager 80 | cacheManager.cacheManagerConfigFile = classpath:ehcache.xml 81 | ##-- in-memory-only Cache 82 | #cacheManager = org.apache.shiro.cache.MemoryConstrainedCacheManager 83 | securityManager.cacheManager = $cacheManager 84 | 85 | #- RememeberMe(org.apache.shiro.web.mgt.CookieRememberMeManager) (DEFAULT) 86 | securityManager.rememberMeManager.cookie.name = rememberMe 87 | # default is /request.getContextPath() 88 | securityManager.rememberMeManager.cookie.path = / 89 | # default is ONE_YEAR 90 | securityManager.rememberMeManager.cookie.maxAge = 31536000 91 | 92 | 93 | #------------------------------ When use Session Clustering: Ehcache + Terracotta 94 | #sessionDAO = org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO 95 | ## This name matches a cache name in ehcache.xml: 96 | #sessionDAO.activeSessionsCacheName = shiro-activeSessionsCache 97 | #securityManager.sessionManager.sessionDAO = $sessionDAO 98 | # 99 | ## Configure The EhCacheManager: 100 | #cacheManager = org.apache.shiro.cache.ehcache.EhCacheManager 101 | #cacheManager.cacheManagerConfigFile = classpath:ehcache.xml 102 | # 103 | ## Configure the above CacheManager on Shiro's SecurityManager 104 | ## to use it for all of Shiro's caching needs: 105 | #securityManager.cacheManager = $cacheManager 106 | #------------------------------ When use Session Clustering: Ehcache + Terracotta 107 | 108 | #- Realm 109 | 110 | #-- DataSource (**USER DEFINED**) 111 | dataSource=com.alibaba.druid.pool.DruidDataSource 112 | dataSource.url=jdbc:mysql://127.0.0.1:3306/easyssh 113 | dataSource.username=root 114 | dataSource.password=root 115 | dataSource.initialSize=1 116 | dataSource.minIdle=1 117 | dataSource.maxActive=20 118 | dataSource.maxWait=60000 119 | dataSource.timeBetweenEvictionRunsMillis=60000 120 | dataSource.minEvictableIdleTimeMillis=300000 121 | dataSource.validationQuery=SELECT 'x' 122 | dataSource.testWhileIdle=true 123 | dataSource.testOnBorrow=false 124 | dataSource.testOnReturn=false 125 | dataSource.poolPreparedStatements=false 126 | dataSource.maxPoolPreparedStatementPerConnectionSize=20 127 | 128 | #-- EasyJdbcRealm (**USER DEFINED**) 129 | #jdbcRealm=org.apache.shiro.realm.jdbc.JdbcRealm 130 | jdbcRealm=cn.easyproject.easyshiro.EasyJdbcRealm 131 | jdbcRealm.dataSource=$dataSource 132 | # Authentication information query; default: select * from users where username = ? 133 | jdbcRealm.authenticationQuery=select user_id as userid,name,password,status,real_name as realname from sys_user where name=? and status in(0,1) 134 | # Password columns Column name; default: password 135 | jdbcRealm.passwordColumn=password 136 | # Roles query (supports multiple username =?); default: select role_name from user_roles where username = ? 137 | jdbcRealm.userRolesQuery=select name from sys_role where role_id in (select role_id from sys_user_role where user_id=(select user_id from sys_user where name=?)) and status=0 138 | # Whether to execute permissions Query permission to query; default: true 139 | jdbcRealm.permissionsLookupEnabled=true 140 | # Permissions query (supports multiple username =?); default: select permission from roles_permissions where role_name = ?" 141 | jdbcRealm.permissionsQuery=select action from sys_menu_permission where MENU_PERMISSION_ID in( select MENU_PERMISSION_ID from sys_role_menu_permission where ROLE_ID in(select role_id from sys_user_role where user_id=(select user_id from sys_user where name=?))) UNION select action from sys_operation_permission where OPERATION_PERMISSION_ID in(select OPERATION_PERMISSION_ID from sys_role_operation_permission where ROLE_ID in(select role_id from sys_user_role where user_id=(select user_id from sys_user where name=?))) 142 | # EasyJdbcRealm Interceptor, after authentication and authorization information can be obtained, for SimpleAuthenticationInfo authentication and authorization information SimpleAuthorizationInfo additional processing 143 | jdbcRealm.interceptor=$realmInterceptor 144 | # customize EasyJdbcRealm Interceptor, after authentication and authorization information can be obtained, for SimpleAuthenticationInfo authentication and authorization information SimpleAuthorizationInfo additional processing 145 | realmInterceptor=cn.easyproject.easyee.ssh.sys.shiro.RealmInterceptor 146 | jdbcRealm.interceptor=$realmInterceptor 147 | 148 | securityManager.realms=$jdbcRealm 149 | 150 | 151 | #- auth Login Authentication (**USER DEFINED**) 152 | 153 | #-- customize auth 154 | #auth=cn.easyproject.easyshiro.EasyFormAuthenticationFilter 155 | auth=cn.easyproject.easyshiro.EasyFormAuthenticationFilter 156 | # specify login form page 157 | # when request method is post execute login, else to login page view 158 | auth.loginUrl = /toLogin.action 159 | # redirect after successful login 160 | auth.successUrl = /toMain.action 161 | # name of request parameter with username; if not present filter assumes 'username' 162 | auth.usernameParam = name 163 | # name of request parameter with password; if not present filter assumes 'password' 164 | auth.passwordParam = password 165 | # does the user wish to be remembered?; if not present filter assumes 'rememberMe' 166 | auth.rememberMeParam = rememberMe 167 | 168 | #-- EasyFormAuthenticationFilter customize Extended Attributes (**USER DEFINED**) 169 | #---- Login Configuration 170 | #Login is successful, the token is stored in the session key;default is 'TOKEN' 171 | # session.setAttribute(sessionTokenName,tokenObject); 172 | auth.sessionTokenKey= TOKEN 173 | # Whether to use the login fails to redirect the way to jump back to the login page;default is 'false' 174 | auth.loginFailureRedirectToLogin = true 175 | 176 | #---- User defined UsernamePasswordToken Configuration (**USER DEFINED**) 177 | # customize UsernamePasswordToken; Default is 'org.apache.shiro.auth.UsernamePasswordToken' 178 | auth.tokenClassName=cn.easyproject.easyee.ssh.sys.shiro.UsernamePasswordEncodeToken 179 | 180 | #---- CAPTCHA Configuration (**USER DEFINED**) 181 | # Whether to open the CAPTCHA; default 'true' 182 | auth.enableCaptcha=true 183 | # CAPTCHA parameter name default 'captcha' 184 | auth.captchaParam = captcha 185 | # CAPTCHA nanme in Session; default 'captcha' 186 | auth.sessionCaptchaKey = rand 187 | 188 | 189 | #--------- AutoLogin Configuration (**USER DEFINED**) 190 | # Are open Auto Login 191 | auth.enableAutoLogin=false 192 | # Auto Login parameter name 193 | auth.autoLoginParam=autoLogin 194 | # Cookie maxAge ,default is ONE_YEAR 195 | auth.autoLoginMaxAge=31536000 196 | # Cookie path,default is "" 197 | auth.autoLoginPath=/ 198 | # Cookie domain,empty or default is your current domain name 199 | #auth.autoLoginDomain= 200 | 201 | #---- LockLogin Configuration Logon failure related error messages (**USER DEFINED**) 202 | # Are oepn LockLogin; default is false,off 203 | auth.enableLockLogin=false 204 | # Shiro CacheManager 205 | auth.ehCacheManager=$cacheManager 206 | # LockLogin Management locked EHCache name cache time period; default shiro-lockLoginCache 207 | auth.lockLoginCacheName=shiro-lockLoginCache 208 | # LockLogin Statistics Log error count time period EHCache cache name; defaults to shiro-lockCheckCache 209 | auth.lockCheckCacheName=shiro-lockCheckCache 210 | #To achieve the same user name to log the number of login errors, login lockout; 0 for no limit; default is 6 211 | auth.userLock=4 212 | # Login achieve the same IP number of errors, login lockout; 0 for no limit; default is 15 213 | auth.ipLock=6 214 | # The specified number of login errors, display codes; -1 does not control verification code display; the default is 1 215 | auth.showCaptcha=2 216 | 217 | #---- Logon failure related error messages (**USER DEFINED**) 218 | # Login failed message key 219 | auth.msgKey = MSG 220 | # The message is stored session,session.setAttribute(MsgKey,xxxErrorMsg); default is 'false' 221 | auth.sessionMsg = true 222 | # The message is stored request,request.setAttribute(MsgKey,xxxErrorMsg); default is 'false' 223 | auth.requestMsg = true 224 | # Login error, an exception in content Map 225 | # ExceptionClassName:"Message", ExceptionClassName2:"Message2", ... 226 | auth.exceptionMsg = LockedAccountException:"Account lockout, please contact the administrator to unlock.", AuthenticationException:"User name or password is incorrect!", EasyIncorrectCaptchaException:"CAPTCHA is incorrect!", EasyLockUserException:"User temporarily locking two hours, please try again later.", EasyLockIPException:"IP temporarily locking two hours, please try again later." 227 | 228 | #---- customize EasyJdbcRealmInterceptor interceptor, You can customize the code after the authentication process succeeds or fails (**USER DEFINED**) 229 | authenticationInterceptor=cn.easyproject.easyee.ssh.sys.shiro.AuthenticationInterceptor 230 | auth.interceptor=$authenticationInterceptor 231 | 232 | 233 | #- user Authentication (**USER DEFINED**) 234 | # user filter, if not remeberMe redirected to the url, default is '/login.jsp' 235 | user.loginUrl=/login.jsp 236 | 237 | #- Logout (**USER DEFINED**) 238 | # specify LogoutFilter 239 | # logout = org.apache.shiro.web.filter.authc.LogoutFilter 240 | # specify logout redirectUrl 241 | logout=cn.easyproject.easyshiro.EasyLogoutFilter 242 | logout.redirectUrl = /login.jsp 243 | # EasyFormAuthenticationFilter 244 | logout.easyFormAuthenticationFilter=$auth 245 | 246 | #- perms (**USER DEFINED**) 247 | ## Authorization filter rules based on URL 248 | perms=cn.easyproject.easyshiro.EasyURLPermissionFilter 249 | # Authentication failed steering url 250 | perms.unauthorizedUrl=/login.jsp 251 | # Login timeout detection is turned on; default is 'true' 252 | perms.authenticationTimeoutCheck= true 253 | 254 | ## Authorization failed related error messages (**USER DEFINED**) 255 | # Authentication failed message key; default is 'msg' 256 | perms.msgKey = msg 257 | # Authentication failed status code key: 301, login timeout; 401 Permission Denied; default is 'statusCode' 258 | perms.statusCode = statusCode 259 | # The message is stored session,session.setAttribute(MsgKey,xxxErrorMsg); default is 'false' 260 | perms.sessionMsg = true 261 | # The message is stored request,request.setAttribute(MsgKey,xxxErrorMsg); default is 'false' 262 | perms.requestMsg = true 263 | # Authentication failed Tips content; default is 'Permission denied!' 264 | perms.permissionDeniedMsg = You do not have permission! 265 | # Login timeout prompt content; default is 'Your login has expired, please login again!' 266 | perms.authenticationTimeoutMsg = Your login has expired, please login again! 267 | 268 | 269 | # ----------------------------------------------------------------------------- 270 | # Urls and their filter 271 | # URL_Ant_Path_Expression = Path_Specific_Filter_Chain 272 | # filter1[optional_config1], filter2[optional_config2], ..., filterN[optional_configN] 273 | # ----------------------------------------------------------------------------- 274 | [urls] (**USER DEFINED**) 275 | # anonymous 276 | /checkCaptcha.action = anon 277 | /notFound.action = anon 278 | 279 | # requests to /DoLogout will be handled by the ‘logout’ filter 280 | /logout.action = logout 281 | 282 | # requests to /toLogin.action will be handled by the ‘auth’ filter 283 | /toLogin.action = auth 284 | 285 | # doc page need auth 286 | /doc/** = auth 287 | 288 | # need to permission 289 | /toMain.action = auth 290 | /**.action = perms -------------------------------------------------------------------------------- /ConfigTemplate/en/spring-shiro-redis.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 211 | 212 | 213 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | # anonymous 319 | /checkCaptcha.action = anon 320 | /notFound.action = anon 321 | 322 | # requests to /DoLogout will be handled by the ‘logout’ filter 323 | /logout.action = logout 324 | 325 | # requests to /toLogin.action will be handled by the ‘auth’ filter 326 | /toLogin.action = auth 327 | 328 | # doc page need auth 329 | /doc/** = auth 330 | 331 | # need to permission 332 | /toMain.action = auth 333 | /**.action = perms 334 | 335 | 336 | 337 | 338 | 339 | 340 | -------------------------------------------------------------------------------- /ConfigTemplate/en/spring-shiro.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 151 | 152 | 153 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | # anonymous 259 | /checkCaptcha.action = anon 260 | /notFound.action = anon 261 | 262 | # requests to /DoLogout will be handled by the ‘logout’ filter 263 | /logout.action = logout 264 | 265 | # requests to /toLogin.action will be handled by the ‘auth’ filter 266 | /toLogin.action = auth 267 | 268 | # doc page need auth 269 | /doc/** = auth 270 | 271 | # need to permission 272 | /toMain.action = auth 273 | /**.action = perms 274 | 275 | 276 | 277 | 278 | 279 | 280 | -------------------------------------------------------------------------------- /ConfigTemplate/en/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | shiroFilter 6 | org.springframework.web.filter.DelegatingFilterProxy 7 | 8 | targetFilterLifecycle 9 | true 10 | 11 | 12 | 13 | org.springframework.web.context.ContextLoaderListener 14 | 15 | 16 | contextConfigLocation 17 | classpath:applicationContext.xml 18 | 19 | 20 | 21 | 30 | 31 | 32 | 33 | 34 | shiroFilter 35 | /* 36 | REQUEST 37 | FORWARD 38 | INCLUDE 39 | ERROR 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /ConfigTemplate/zh_CN/RBAC_MySQL.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Navicat MySQL Data Transfer 3 | 4 | Source Server : localhost 5 | Source Server Version : 50626 6 | Source Host : localhost:3306 7 | Source Database : easyssh 8 | 9 | Target Server Type : MYSQL 10 | Target Server Version : 50626 11 | File Encoding : 65001 12 | 13 | Date: 2015-09-09 00:57:45 14 | */ 15 | 16 | SET FOREIGN_KEY_CHECKS=0; 17 | 18 | -- ---------------------------- 19 | -- Table structure for sys_log 20 | -- ---------------------------- 21 | DROP TABLE IF EXISTS `sys_log`; 22 | CREATE TABLE `sys_log` ( 23 | `LOG_ID` int(11) NOT NULL AUTO_INCREMENT, 24 | `ACTION` varchar(500) DEFAULT NULL, 25 | `PARAMETERS` varchar(500) DEFAULT NULL, 26 | `RES` varchar(500) DEFAULT NULL, 27 | `ACCOUNT` varchar(200) DEFAULT NULL, 28 | `IP` varchar(200) DEFAULT NULL, 29 | `LOG_TIME` datetime DEFAULT CURRENT_TIMESTAMP, 30 | PRIMARY KEY (`LOG_ID`) 31 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 32 | 33 | -- ---------------------------- 34 | -- Records of sys_log 35 | -- ---------------------------- 36 | 37 | -- ---------------------------- 38 | -- Table structure for sys_menu_permission 39 | -- ---------------------------- 40 | DROP TABLE IF EXISTS `sys_menu_permission`; 41 | CREATE TABLE `sys_menu_permission` ( 42 | `MENU_PERMISSION_ID` int(11) NOT NULL AUTO_INCREMENT, 43 | `NAME` varchar(50) NOT NULL, 44 | `ACTION` varchar(500) DEFAULT NULL, 45 | `PARENT_ID` int(11) DEFAULT NULL, 46 | `SORT_ORDER` int(11) DEFAULT NULL, 47 | `ICON` varchar(50) DEFAULT NULL, 48 | `REMARK` varchar(500) DEFAULT NULL, 49 | PRIMARY KEY (`MENU_PERMISSION_ID`), 50 | KEY `FK_FK_SYS_MENU_RIGHTS_ID` (`PARENT_ID`) USING BTREE, 51 | CONSTRAINT `sys_menu_permission_ibfk_1` FOREIGN KEY (`PARENT_ID`) REFERENCES `sys_menu_permission` (`MENU_PERMISSION_ID`) 52 | ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8; 53 | 54 | -- ---------------------------- 55 | -- Records of sys_menu_permission 56 | -- ---------------------------- 57 | INSERT INTO `sys_menu_permission` VALUES ('1', 'EasySSH', 'toMain.action', null, '0', 'icon-home2', ''); 58 | INSERT INTO `sys_menu_permission` VALUES ('2', '系统管理', null, '1', '0', 'icon-application_view_tile', '系统维护管理,系统管理员拥有'); 59 | INSERT INTO `sys_menu_permission` VALUES ('3', '用户管理', 'toSysUser.action', '2', '0', 'icon-user', null); 60 | INSERT INTO `sys_menu_permission` VALUES ('4', '角色管理', 'toSysRole.action', '2', '1', 'icon-grade', null); 61 | INSERT INTO `sys_menu_permission` VALUES ('5', '菜单权限管理', 'toSysMenuPermission.action', '2', '2', 'icon-menu', null); 62 | INSERT INTO `sys_menu_permission` VALUES ('6', '操作权限管理', 'toSysOperationPermission.action', '2', '3', 'icon-rights', null); 63 | INSERT INTO `sys_menu_permission` VALUES ('7', '员工管理', null, '1', '1', 'icon-report', '人事部操作'); 64 | INSERT INTO `sys_menu_permission` VALUES ('8', '部门信息管理', 'toDept.action', '7', '1', 'icon-group', ''); 65 | INSERT INTO `sys_menu_permission` VALUES ('9', '员工信息管理', 'toEmp.action', '7', '2', 'icon-id', ''); 66 | INSERT INTO `sys_menu_permission` VALUES ('10', '报表管理', null, '1', '2', 'icon-chart_bar', '经理查看'); 67 | INSERT INTO `sys_menu_permission` VALUES ('11', '统计报表', 'toReports.action', '10', '0', 'icon-chart_curve', ''); 68 | INSERT INTO `sys_menu_permission` VALUES ('13', '系统日志', 'toSysLog.action', '2', '4', 'icon-book', '系统日志查看'); 69 | 70 | -- ---------------------------- 71 | -- Table structure for sys_operation_permission 72 | -- ---------------------------- 73 | DROP TABLE IF EXISTS `sys_operation_permission`; 74 | CREATE TABLE `sys_operation_permission` ( 75 | `OPERATION_PERMISSION_ID` int(11) NOT NULL AUTO_INCREMENT, 76 | `MENU_PERMISSION_ID` int(11) DEFAULT NULL, 77 | `NAME` varchar(50) NOT NULL, 78 | `ACTION` varchar(500) DEFAULT NULL, 79 | `REMARK` varchar(500) DEFAULT NULL, 80 | PRIMARY KEY (`OPERATION_PERMISSION_ID`), 81 | KEY `FK_FK_SYS_OPERATION_MENU_ID` (`MENU_PERMISSION_ID`) USING BTREE, 82 | CONSTRAINT `sys_operation_permission_ibfk_1` FOREIGN KEY (`MENU_PERMISSION_ID`) REFERENCES `sys_menu_permission` (`MENU_PERMISSION_ID`) 83 | ) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8; 84 | 85 | -- ---------------------------- 86 | -- Records of sys_operation_permission 87 | -- ---------------------------- 88 | INSERT INTO `sys_operation_permission` VALUES ('37', '5', '查询菜单列表', 'sysMenuPermission_list.action', ''); 89 | INSERT INTO `sys_operation_permission` VALUES ('38', '5', '修改菜单', 'sysMenuPermission_update.action', ''); 90 | INSERT INTO `sys_operation_permission` VALUES ('39', '5', '删除菜单', 'sysMenuPermission_delete.action', ''); 91 | INSERT INTO `sys_operation_permission` VALUES ('40', '5', '移动菜单次序', 'sysMenuPermission_move.action', ''); 92 | INSERT INTO `sys_operation_permission` VALUES ('41', '5', '添加菜单', 'sysMenuPermission_save.action', ''); 93 | INSERT INTO `sys_operation_permission` VALUES ('42', '6', '菜单列表查询', 'sysMenuPermission_list.action', ''); 94 | INSERT INTO `sys_operation_permission` VALUES ('43', '6', '查询菜单对应的操作权限列表', 'sysOperationPermission_list.action', ''); 95 | INSERT INTO `sys_operation_permission` VALUES ('44', '6', '新增操作权限', 'sysOperationPermission_save.action', ''); 96 | INSERT INTO `sys_operation_permission` VALUES ('45', '6', '修改操作权限', 'sysOperationPermission_update.action', ''); 97 | INSERT INTO `sys_operation_permission` VALUES ('46', '6', '删除操作权限', 'sysOperationPermission_delete.action', ''); 98 | INSERT INTO `sys_operation_permission` VALUES ('47', '4', '查询所有角色', 'sysRole_list.action', ''); 99 | INSERT INTO `sys_operation_permission` VALUES ('48', '4', '添加角色', 'sysRole_save.action,sysMenuPermission_listAll.action,sysMenuPermission_listAllForSysRole.action', ''); 100 | INSERT INTO `sys_operation_permission` VALUES ('49', '4', '修改角色', 'sysRole_update.action#sysRole_getAllPermissionsId.action,sysMenuPermission_listAll.action,sysMenuPermission_listAllForSysRole.action', '修改角色需要获得用户的相关角色权限'); 101 | INSERT INTO `sys_operation_permission` VALUES ('50', '4', '删除角色', 'sysRole_delete.action', ''); 102 | INSERT INTO `sys_operation_permission` VALUES ('52', '3', '查询用户列表', 'sysUser_list.action', ''); 103 | INSERT INTO `sys_operation_permission` VALUES ('53', '3', '添加用户', 'sysUser_save.action,sysRole_all.action', ''); 104 | INSERT INTO `sys_operation_permission` VALUES ('54', '3', '修改用户', 'sysUser_update.action,sysRole_all.action', ''); 105 | INSERT INTO `sys_operation_permission` VALUES ('55', '3', '删除用户', 'sysUser_delete.action', ''); 106 | INSERT INTO `sys_operation_permission` VALUES ('56', '3', '显示添加用户按钮', 'sysUserAddBtn', '显示权限'); 107 | INSERT INTO `sys_operation_permission` VALUES ('57', '3', '显示删除用户按钮', 'sysUserDelBtn', '显示权限'); 108 | INSERT INTO `sys_operation_permission` VALUES ('58', '3', '显示修改用户按钮', 'sysUserUpdateBtn', '显示权限'); 109 | INSERT INTO `sys_operation_permission` VALUES ('59', '3', '显示真实姓名列信息', 'showRealNameColumn', '显示权限'); 110 | INSERT INTO `sys_operation_permission` VALUES ('60', '8', '添加新部门', 'dept_save.action', ''); 111 | INSERT INTO `sys_operation_permission` VALUES ('61', '8', '修改部门', 'dept_update.action', ''); 112 | INSERT INTO `sys_operation_permission` VALUES ('62', '8', '删除部门', 'dept_delete.action', ''); 113 | INSERT INTO `sys_operation_permission` VALUES ('63', '8', '查询部门列表', 'dept_list.action', ''); 114 | INSERT INTO `sys_operation_permission` VALUES ('64', '8', '显示动作-删除部门', 'deptDeleteShow', ''); 115 | INSERT INTO `sys_operation_permission` VALUES ('65', '9', '添加员工', 'emp_save.action,emp_allDept.action', ''); 116 | INSERT INTO `sys_operation_permission` VALUES ('66', '9', '修改员工', 'emp_update.action,emp_allDept.action', ''); 117 | INSERT INTO `sys_operation_permission` VALUES ('67', '9', '删除员工', 'emp_delete.action', ''); 118 | INSERT INTO `sys_operation_permission` VALUES ('68', '9', '查看员工列表', 'emp_list.action,emp_allDept.action', ''); 119 | INSERT INTO `sys_operation_permission` VALUES ('69', '13', '查询日志', 'sysLog_list.action', ''); 120 | 121 | -- ---------------------------- 122 | -- Table structure for sys_role 123 | -- ---------------------------- 124 | DROP TABLE IF EXISTS `sys_role`; 125 | CREATE TABLE `sys_role` ( 126 | `ROLE_ID` int(11) NOT NULL AUTO_INCREMENT, 127 | `NAME` varchar(50) NOT NULL, 128 | `STATUS` int(11) DEFAULT '0', 129 | `REMARK` varchar(500) DEFAULT NULL, 130 | PRIMARY KEY (`ROLE_ID`) 131 | ) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8; 132 | 133 | -- ---------------------------- 134 | -- Records of sys_role 135 | -- ---------------------------- 136 | INSERT INTO `sys_role` VALUES ('1', '超级管理员', '0', '拥有所有管理权限'); 137 | INSERT INTO `sys_role` VALUES ('23', '系统管理员', '0', '管理系统用户和权限分配。\r\n不能删除用户,不显示删除按钮;不显示真实姓名'); 138 | INSERT INTO `sys_role` VALUES ('24', 'HR', '0', '员工管理模块'); 139 | INSERT INTO `sys_role` VALUES ('25', '经理', '0', '报表查看'); 140 | 141 | -- ---------------------------- 142 | -- Table structure for sys_role_menu_permission 143 | -- ---------------------------- 144 | DROP TABLE IF EXISTS `sys_role_menu_permission`; 145 | CREATE TABLE `sys_role_menu_permission` ( 146 | `ROLE_ID` int(11) NOT NULL, 147 | `MENU_PERMISSION_ID` int(11) NOT NULL, 148 | PRIMARY KEY (`ROLE_ID`,`MENU_PERMISSION_ID`), 149 | KEY `FK_FK_SYS_ROLE_RIGHTS_RIGHTS_ID` (`MENU_PERMISSION_ID`) USING BTREE, 150 | CONSTRAINT `sys_role_menu_permission_ibfk_1` FOREIGN KEY (`ROLE_ID`) REFERENCES `sys_role` (`ROLE_ID`), 151 | CONSTRAINT `sys_role_menu_permission_ibfk_2` FOREIGN KEY (`MENU_PERMISSION_ID`) REFERENCES `sys_menu_permission` (`MENU_PERMISSION_ID`) 152 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 153 | 154 | -- ---------------------------- 155 | -- Records of sys_role_menu_permission 156 | -- ---------------------------- 157 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '1'); 158 | INSERT INTO `sys_role_menu_permission` VALUES ('23', '1'); 159 | INSERT INTO `sys_role_menu_permission` VALUES ('24', '1'); 160 | INSERT INTO `sys_role_menu_permission` VALUES ('25', '1'); 161 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '2'); 162 | INSERT INTO `sys_role_menu_permission` VALUES ('23', '2'); 163 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '3'); 164 | INSERT INTO `sys_role_menu_permission` VALUES ('23', '3'); 165 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '4'); 166 | INSERT INTO `sys_role_menu_permission` VALUES ('23', '4'); 167 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '5'); 168 | INSERT INTO `sys_role_menu_permission` VALUES ('23', '5'); 169 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '6'); 170 | INSERT INTO `sys_role_menu_permission` VALUES ('23', '6'); 171 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '7'); 172 | INSERT INTO `sys_role_menu_permission` VALUES ('24', '7'); 173 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '8'); 174 | INSERT INTO `sys_role_menu_permission` VALUES ('24', '8'); 175 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '9'); 176 | INSERT INTO `sys_role_menu_permission` VALUES ('24', '9'); 177 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '10'); 178 | INSERT INTO `sys_role_menu_permission` VALUES ('25', '10'); 179 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '11'); 180 | INSERT INTO `sys_role_menu_permission` VALUES ('25', '11'); 181 | INSERT INTO `sys_role_menu_permission` VALUES ('1', '13'); 182 | INSERT INTO `sys_role_menu_permission` VALUES ('23', '13'); 183 | 184 | -- ---------------------------- 185 | -- Table structure for sys_role_operation_permission 186 | -- ---------------------------- 187 | DROP TABLE IF EXISTS `sys_role_operation_permission`; 188 | CREATE TABLE `sys_role_operation_permission` ( 189 | `ROLE_ID` int(11) NOT NULL, 190 | `OPERATION_PERMISSION_ID` int(11) NOT NULL, 191 | PRIMARY KEY (`ROLE_ID`,`OPERATION_PERMISSION_ID`), 192 | KEY `FK_FK_SYS_ROLE_OPERATION_RIGHTS_OPERATION_RIGHTS_ID` (`OPERATION_PERMISSION_ID`) USING BTREE, 193 | CONSTRAINT `sys_role_operation_permission_ibfk_1` FOREIGN KEY (`ROLE_ID`) REFERENCES `sys_role` (`ROLE_ID`), 194 | CONSTRAINT `sys_role_operation_permission_ibfk_2` FOREIGN KEY (`OPERATION_PERMISSION_ID`) REFERENCES `sys_operation_permission` (`OPERATION_PERMISSION_ID`) 195 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 196 | 197 | -- ---------------------------- 198 | -- Records of sys_role_operation_permission 199 | -- ---------------------------- 200 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '37'); 201 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '37'); 202 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '38'); 203 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '38'); 204 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '39'); 205 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '39'); 206 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '40'); 207 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '40'); 208 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '41'); 209 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '41'); 210 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '42'); 211 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '42'); 212 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '43'); 213 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '43'); 214 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '44'); 215 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '44'); 216 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '45'); 217 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '45'); 218 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '46'); 219 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '46'); 220 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '47'); 221 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '47'); 222 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '48'); 223 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '48'); 224 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '49'); 225 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '49'); 226 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '50'); 227 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '50'); 228 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '52'); 229 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '52'); 230 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '53'); 231 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '53'); 232 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '54'); 233 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '54'); 234 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '55'); 235 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '56'); 236 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '56'); 237 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '57'); 238 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '57'); 239 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '58'); 240 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '58'); 241 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '59'); 242 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '59'); 243 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '60'); 244 | INSERT INTO `sys_role_operation_permission` VALUES ('24', '60'); 245 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '61'); 246 | INSERT INTO `sys_role_operation_permission` VALUES ('24', '61'); 247 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '62'); 248 | INSERT INTO `sys_role_operation_permission` VALUES ('24', '62'); 249 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '63'); 250 | INSERT INTO `sys_role_operation_permission` VALUES ('24', '63'); 251 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '64'); 252 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '65'); 253 | INSERT INTO `sys_role_operation_permission` VALUES ('24', '65'); 254 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '66'); 255 | INSERT INTO `sys_role_operation_permission` VALUES ('24', '66'); 256 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '67'); 257 | INSERT INTO `sys_role_operation_permission` VALUES ('24', '67'); 258 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '68'); 259 | INSERT INTO `sys_role_operation_permission` VALUES ('24', '68'); 260 | INSERT INTO `sys_role_operation_permission` VALUES ('1', '69'); 261 | INSERT INTO `sys_role_operation_permission` VALUES ('23', '69'); 262 | 263 | -- ---------------------------- 264 | -- Table structure for sys_user 265 | -- ---------------------------- 266 | DROP TABLE IF EXISTS `sys_user`; 267 | CREATE TABLE `sys_user` ( 268 | `USER_ID` int(11) NOT NULL AUTO_INCREMENT, 269 | `NAME` varchar(50) NOT NULL, 270 | `PASSWORD` varchar(100) NOT NULL, 271 | `STATUS` int(11) DEFAULT '0', 272 | `REAL_NAME` varchar(50) DEFAULT NULL, 273 | PRIMARY KEY (`USER_ID`), 274 | UNIQUE KEY `UQ_SYS_USER_NAME` (`NAME`) 275 | ) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8; 276 | 277 | -- ---------------------------- 278 | -- Records of sys_user 279 | -- ---------------------------- 280 | INSERT INTO `sys_user` VALUES ('1', 'admin', '2472eee54aa664e9dd0536c063796e54e', '0', '晁关'); 281 | INSERT INTO `sys_user` VALUES ('2', 'user', '6be7f718d9321e812231ab838448385d', '0', '蒲关'); 282 | INSERT INTO `sys_user` VALUES ('35', 'hr', '5fb4acd4ee14b8c276eacf6da9fe20c7', '0', '任立'); 283 | INSERT INTO `sys_user` VALUES ('38', 'manager', '3cf4a2940d8b738cb425e87fc6e2d82f', '0', '荆力'); 284 | 285 | 286 | -- ---------------------------- 287 | -- Table structure for sys_user_role 288 | -- ---------------------------- 289 | DROP TABLE IF EXISTS `sys_user_role`; 290 | CREATE TABLE `sys_user_role` ( 291 | `USER_ID` int(11) NOT NULL, 292 | `ROLE_ID` int(11) NOT NULL, 293 | PRIMARY KEY (`USER_ID`,`ROLE_ID`), 294 | KEY `FK_FK_SYS_USER_ROLE_ROLE_ID` (`ROLE_ID`) USING BTREE, 295 | CONSTRAINT `sys_user_role_ibfk_1` FOREIGN KEY (`USER_ID`) REFERENCES `sys_user` (`USER_ID`), 296 | CONSTRAINT `sys_user_role_ibfk_2` FOREIGN KEY (`ROLE_ID`) REFERENCES `sys_role` (`ROLE_ID`) 297 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 298 | 299 | -- ---------------------------- 300 | -- Records of sys_user_role 301 | -- ---------------------------- 302 | INSERT INTO `sys_user_role` VALUES ('1', '1'); 303 | INSERT INTO `sys_user_role` VALUES ('2', '23'); 304 | INSERT INTO `sys_user_role` VALUES ('35', '24'); 305 | INSERT INTO `sys_user_role` VALUES ('38', '25'); 306 | -------------------------------------------------------------------------------- /ConfigTemplate/zh_CN/ehcache.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24 | 25 | 26 | 48 | 49 | 110 | 111 | 145 | 146 | 147 | 267 | 268 | 269 | 273 | 284 | 285 | 286 | 292 | 300 | 301 | 302 | 303 | 304 | 305 | 315 | 316 | 317 | 318 | 319 | 329 | 330 | 331 | 332 | 333 | -------------------------------------------------------------------------------- /ConfigTemplate/zh_CN/shiro.ini: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------------------- 2 | # Users and their (optional) assigned roles 3 | # username = password, role1, role2, ..., roleN 4 | # ----------------------------------------------------------------------------- 5 | [users] 6 | #admin = admin123, admin 7 | #jay = 123, user 8 | #guest = guest, guest 9 | 10 | # ----------------------------------------------------------------------------- 11 | # Roles with assigned permissions 12 | # roleName = perm1, perm2, ..., permN 13 | # ----------------------------------------------------------------------------- 14 | [roles] 15 | #admin = * 16 | #user = log:* 17 | 18 | 19 | # ----------------------------------------------------------------------------- 20 | # Configuration SessionManager, Cache, Filter 21 | # myFilter = com.company.web.some.FilterImplementation 22 | # myFilter.property1 = value1 23 | # ----------------------------------------------------------------------------- 24 | 25 | [main] 26 | #- Session Manager 27 | # securityManager.sessionManager.xxxx=xxxx 28 | 29 | #-- Shiro Native SessionManager (DEFAULT) 30 | sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager 31 | # Use the configured native session manager: 32 | securityManager.sessionManager = $sessionManager 33 | 34 | #-- Session Timeout (DEFAULT) 35 | # 3,600,000 milliseconds = 1 hour 36 | securityManager.sessionManager.globalSessionTimeout = 3600000 37 | 38 | #-- Session Listeners 39 | # implement the SessionListener interface (or extend the convenience SessionListenerAdapter) 40 | # As the default SessionManager sessionListeners property is a collection, you can configure the SessionManager with one or more of your listener implementations like any other collection in shiro.ini: 41 | #aSessionListener = com.foo.my.SessionListener 42 | #anotherSessionListener = com.foo.my.OtherSessionListener 43 | #securityManager.sessionManager.sessionListeners = $aSessionListener, $anotherSessionListener, etc. 44 | 45 | 46 | #-- Custom Session IDs 47 | # The default SessionIdGenerator is a JavaUuidSessionIdGenerator, 48 | # which generates String IDs based on Java UUIDs. 49 | #sessionIdGenerator = com.my.session.SessionIdGenerator 50 | #securityManager.sessionManager.sessionDAO.sessionIdGenerator = $sessionIdGenerator 51 | 52 | 53 | #-- SessionValidationScheduler (DEFAULT) 54 | # Sessions are only validated to see 55 | # if they have been stopped or expired at the time they are accessed, 56 | # A SessionValidationScheduler is responsible for validating sessions 57 | # at a periodic rate to ensure they are cleaned up as necessary. 58 | # You can custom SessionValidationScheduler implementation class. 59 | sessionValidationScheduler = org.apache.shiro.session.mgt.ExecutorServiceSessionValidationScheduler 60 | # Default is 3,600,000 millis = 1 hour: 61 | sessionValidationScheduler.interval = 3600000 62 | securityManager.sessionManager.sessionValidationScheduler = $sessionValidationScheduler 63 | #securityManager.sessionManager.sessionValidationSchedulerEnabled = false 64 | 65 | 66 | #-- Session DAO (DEFAULT) 67 | # cache in the CacheManager should be used to store active sessions: 68 | sessionDAO = org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO 69 | securityManager.sessionManager.sessionDAO = $sessionDAO 70 | # By default, the EnterpriseCacheSessionDAO asks the CacheManager 71 | # for a Cache named "shiro-activeSessionCache" 72 | #sessionDAO.activeSessionsCacheName = ehcache_region_name 73 | 74 | 75 | #- Cache 76 | # securityManager.cacheManager 77 | 78 | #-- EhCache (DEFAULT) 79 | cacheManager = org.apache.shiro.cache.ehcache.EhCacheManager 80 | cacheManager.cacheManagerConfigFile = classpath:ehcache.xml 81 | ##-- in-memory-only Cache 82 | #cacheManager = org.apache.shiro.cache.MemoryConstrainedCacheManager 83 | securityManager.cacheManager = $cacheManager 84 | 85 | #- RememeberMe(org.apache.shiro.web.mgt.CookieRememberMeManager) (DEFAULT) 86 | securityManager.rememberMeManager.cookie.name = rememberMe 87 | # default is /request.getContextPath() 88 | securityManager.rememberMeManager.cookie.path = / 89 | # default is ONE_YEAR 90 | securityManager.rememberMeManager.cookie.maxAge = 31536000 91 | 92 | 93 | #------------------------------ When use Session Clustering: Ehcache + Terracotta 94 | #sessionDAO = org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO 95 | ## This name matches a cache name in ehcache.xml: 96 | #sessionDAO.activeSessionsCacheName = shiro-activeSessionsCache 97 | #securityManager.sessionManager.sessionDAO = $sessionDAO 98 | # 99 | ## Configure The EhCacheManager: 100 | #cacheManager = org.apache.shiro.cache.ehcache.EhCacheManager 101 | #cacheManager.cacheManagerConfigFile = classpath:ehcache.xml 102 | # 103 | ## Configure the above CacheManager on Shiro's SecurityManager 104 | ## to use it for all of Shiro's caching needs: 105 | #securityManager.cacheManager = $cacheManager 106 | #------------------------------ When use Session Clustering: Ehcache + Terracotta 107 | 108 | #- Realm 109 | 110 | #-- DataSource (**USER DEFINED**) 111 | dataSource=com.alibaba.druid.pool.DruidDataSource 112 | dataSource.url=jdbc:mysql://127.0.0.1:3306/easyssh 113 | dataSource.username=root 114 | dataSource.password=root 115 | dataSource.initialSize=1 116 | dataSource.minIdle=1 117 | dataSource.maxActive=20 118 | dataSource.maxWait=60000 119 | dataSource.timeBetweenEvictionRunsMillis=60000 120 | dataSource.minEvictableIdleTimeMillis=300000 121 | dataSource.validationQuery=SELECT 'x' 122 | dataSource.testWhileIdle=true 123 | dataSource.testOnBorrow=false 124 | dataSource.testOnReturn=false 125 | dataSource.poolPreparedStatements=false 126 | dataSource.maxPoolPreparedStatementPerConnectionSize=20 127 | 128 | 129 | #-- EasyJdbcRealm (**USER DEFINED**) 130 | #jdbcRealm=org.apache.shiro.realm.jdbc.JdbcRealm 131 | jdbcRealm=cn.easyproject.easyshiro.EasyJdbcRealm 132 | jdbcRealm.dataSource=$dataSource 133 | # 认证信息查询语句; default: select * from users where username = ? 134 | jdbcRealm.authenticationQuery=select user_id as userid,name,password,status,real_name as realname from sys_user where name=? and status in(0,1) 135 | # 密码列列名; default: password 136 | jdbcRealm.passwordColumn=password 137 | # 角色查询语句(支持多个username=?); default: select role_name from user_roles where username = ? 138 | jdbcRealm.userRolesQuery=select name from sys_role where role_id in (select role_id from sys_user_role where user_id=(select user_id from sys_user where name=?)) and status=0 139 | # 是否执行permissionsQuery权限查询; default: true 140 | jdbcRealm.permissionsLookupEnabled=true 141 | # 权限查询语句(支持多个username=?); default: select permission from roles_permissions where role_name = ?" 142 | jdbcRealm.permissionsQuery=select action from sys_menu_permission where MENU_PERMISSION_ID in( select MENU_PERMISSION_ID from sys_role_menu_permission where ROLE_ID in(select role_id from sys_user_role where user_id=(select user_id from sys_user where name=?))) UNION select action from sys_operation_permission where OPERATION_PERMISSION_ID in(select OPERATION_PERMISSION_ID from sys_role_operation_permission where ROLE_ID in(select role_id from sys_user_role where user_id=(select user_id from sys_user where name=?))) 143 | # EasyJdbcRealm 拦截器,可以认证和授权信息获得后,对SimpleAuthenticationInfo认证和SimpleAuthorizationInfo授权信息进行额外处理 144 | jdbcRealm.interceptor=$realmInterceptor 145 | # 自定义 EasyJdbcRealm 拦截器,可以认证和授权信息获得后,对SimpleAuthenticationInfo认证和SimpleAuthorizationInfo授权信息进行额外处理 146 | realmInterceptor=cn.easyproject.easyee.ssh.sys.shiro.RealmInterceptor 147 | jdbcRealm.interceptor=$realmInterceptor 148 | 149 | securityManager.realms=$jdbcRealm 150 | 151 | 152 | 153 | #- auth Login Authentication (**USER DEFINED**) 154 | 155 | #-- 自定义 auth 156 | #auth=cn.easyproject.easyshiro.EasyFormAuthenticationFilter 157 | auth=cn.easyproject.easyshiro.EasyFormAuthenticationFilter 158 | # specify login form page 159 | # when request method is post execute login, else to login page view 160 | auth.loginUrl = /toLogin.action 161 | # redirect after successful login 162 | auth.successUrl = /toMain.action 163 | # name of request parameter with username; if not present filter assumes 'username' 164 | auth.usernameParam = name 165 | # name of request parameter with password; if not present filter assumes 'password' 166 | auth.passwordParam = password 167 | # does the user wish to be remembered?; if not present filter assumes 'rememberMe' 168 | auth.rememberMeParam = rememberMe 169 | 170 | #-- EasyFormAuthenticationFilter 自定义扩展属性 (**USER DEFINED**) 171 | #---- Login Configuration 172 | # 登录成功,将 token 存入 session 的 key; default is 'TOKEN' 173 | # session.setAttribute(sessionTokenName,tokenObject); 174 | auth.sessionTokenKey= TOKEN 175 | # 是否使用登录失败以重定向方式跳转回登录页面; default is 'false' 176 | auth.loginFailureRedirectToLogin = true 177 | 178 | #---- User defined UsernamePasswordToken Configuration (**USER DEFINED**) 179 | # 自定义 UsernamePasswordToken; Default is 'org.apache.shiro.auth.UsernamePasswordToken' 180 | auth.tokenClassName=cn.easyproject.easyee.ssh.sys.shiro.UsernamePasswordEncodeToken 181 | 182 | #---- CAPTCHA Configuration (**USER DEFINED**) 183 | # 是否开启验证码; default 'true' 184 | auth.enableCaptcha=true 185 | # 验证码参数名; default 'captcha' 186 | auth.captchaParam = captcha 187 | # Session中存储验证码值得可以; default 'captcha' 188 | auth.sessionCaptchaKey = rand 189 | 190 | 191 | #--------- AutoLogin Configuration (**USER DEFINED**) 192 | # 是否开启自动登录 193 | auth.enableAutoLogin=false 194 | # 自动登录参数数名 195 | auth.autoLoginParam=autoLogin 196 | # Cookie maxAge ,default is ONE_YEAR 197 | auth.autoLoginMaxAge=31536000 198 | # Cookie path,default is "" 199 | auth.autoLoginPath=/ 200 | # Cookie domain,empty or default is your current domain name 201 | #auth.autoLoginDomain= 202 | 203 | #---- LockLogin Configuration 登录失败相关错误消息 (**USER DEFINED**) 204 | # 是否开启LockLogin用户登录锁定;默认为false,不开启 205 | auth.enableLockLogin=false 206 | # Shiro CacheManager 207 | auth.ehCacheManager=$cacheManager 208 | # LockLogin 管理锁定时间周期的 EHCache 缓存名称;默认为 shiro-lockLoginCache 209 | auth.lockLoginCacheName=shiro-lockLoginCache 210 | # LockLogin 统计登录错误次数时间周期的 EHCache 缓存名称;默认为 shiro-lockCheckCache 211 | auth.lockCheckCacheName=shiro-lockCheckCache 212 | # 同一用户名登录达到登录错误次数,登录锁定;0为不限制;默认为6 213 | auth.userLock=4 214 | # 同一IP登录达到错误次数,登录锁定;0为不限制;默认为15 215 | auth.ipLock=6 216 | # 达到指定登录错误次数,显示验证码;-1为不控制验证码显示;默认为1 217 | auth.showCaptcha=2 218 | 219 | 220 | 221 | #---- 登录失败相关错误消息 (**USER DEFINED**) 222 | # 登录失败,消息 key 223 | auth.msgKey = MSG 224 | # 将消息存入session,session.setAttribute(MsgKey,xxxErrorMsg); default is 'false' 225 | auth.sessionMsg = true 226 | # 将消息存入request,request.setAttribute(MsgKey,xxxErrorMsg); default is 'false' 227 | auth.requestMsg = true 228 | # 登录错误的,异常提示内容 Map 229 | # ExceptionClassName:"Message", ExceptionClassName2:"Message2", ... 230 | auth.exceptionMsg = LockedAccountException:"账户锁定,请联系管理员解锁。", AuthenticationException:"用户名,或密码有误!", EasyIncorrectCaptchaException:"验证码有误!", EasyLockUserException:"由于该用户连续登录错误,暂时被锁定 2 小时,请稍后再试。", EasyLockIPException:"由于该IP连续登录错误,暂时被锁定 2 小时,请稍后再试。" 231 | 232 | 233 | #---- 自定义 EasyJdbcRealmInterceptor 拦截器,可以在认证成功或失败后进行自定义代码处理 (**USER DEFINED**) 234 | authenticationInterceptor=cn.easyproject.easyee.ssh.sys.shiro.AuthenticationInterceptor 235 | auth.interceptor=$authenticationInterceptor 236 | 237 | #- user Authentication (**USER DEFINED**) 238 | # user filter, if not remeberMe redirected to the url, default is '/login.jsp' 239 | user.loginUrl=/login.jsp 240 | 241 | 242 | #- Logout (**USER DEFINED**) 243 | # specify LogoutFilter 244 | # logout = org.apache.shiro.web.filter.authc.LogoutFilter 245 | # specify logout redirectUrl 246 | logout=cn.easyproject.easyshiro.EasyLogoutFilter 247 | logout.redirectUrl = /login.jsp 248 | # EasyFormAuthenticationFilter 249 | logout.easyFormAuthenticationFilter=$auth 250 | 251 | 252 | #- perms (**USER DEFINED**) 253 | ## 自定义基于 URL规则 授权过滤器 254 | perms=cn.easyproject.easyshiro.EasyURLPermissionFilter 255 | # 权限验证失败,转向的url 256 | perms.unauthorizedUrl=/login.jsp 257 | # 是否开启登录超时检测; default is 'true' 258 | perms.authenticationTimeoutCheck= true 259 | 260 | ## 权限验证失败相关错误消息 (**USER DEFINED**) 261 | # 权限验证失败,消息 key; default is 'msg' 262 | perms.msgKey = msg 263 | # 权限验证失败,状态码 key:301,登录超时; 401,权限拒绝; default is 'statusCode' 264 | perms.statusCode = statusCode 265 | # 将消息存入session,session.setAttribute(MsgKey,xxxErrorMsg); default is 'false' 266 | perms.sessionMsg = true 267 | # 将消息存入request,request.setAttribute(MsgKey,xxxErrorMsg); default is 'false' 268 | perms.requestMsg = true 269 | # 认证失败提示内容; default is 'Permission denied!' 270 | perms.permissionDeniedMsg = 您没有权限! 271 | # 登录超时提示内容; default is 'Your login has expired, please login again!' 272 | perms.authenticationTimeoutMsg = 您的登录已过期,请重新登录! 273 | 274 | 275 | 276 | # ----------------------------------------------------------------------------- 277 | # Urls and their filter 278 | # URL_Ant_Path_Expression = Path_Specific_Filter_Chain 279 | # filter1[optional_config1], filter2[optional_config2], ..., filterN[optional_configN] 280 | # ----------------------------------------------------------------------------- 281 | [urls] (**USER DEFINED**) 282 | # anonymous 283 | /checkCaptcha.action = anon 284 | /notFound.action = anon 285 | 286 | # requests to /DoLogout will be handled by the ‘logout’ filter 287 | /logout.action = logout 288 | 289 | # requests to /toLogin.action will be handled by the ‘auth’ filter 290 | /toLogin.action = auth 291 | 292 | # doc page need auth 293 | /doc/** = auth 294 | 295 | # need to permission 296 | /toMain.action = auth 297 | /**.action = perms 298 | 299 | 300 | 301 | 302 | -------------------------------------------------------------------------------- /ConfigTemplate/zh_CN/spring-shiro-redis.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 214 | 215 | 216 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | # anonymous 321 | /checkCaptcha.action = anon 322 | /notFound.action = anon 323 | 324 | # requests to /DoLogout will be handled by the ‘logout’ filter 325 | /logout.action = logout 326 | 327 | # requests to /toLogin.action will be handled by the ‘auth’ filter 328 | /toLogin.action = auth 329 | 330 | # doc page need auth 331 | /doc/** = auth 332 | 333 | # need to permission 334 | /toMain.action = auth 335 | /**.action = perms 336 | 337 | 338 | 339 | 340 | 341 | 342 | -------------------------------------------------------------------------------- /ConfigTemplate/zh_CN/spring-shiro.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 151 | 152 | 153 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | # anonymous 258 | /checkCaptcha.action = anon 259 | /notFound.action = anon 260 | 261 | # requests to /DoLogout will be handled by the ‘logout’ filter 262 | /logout.action = logout 263 | 264 | # requests to /toLogin.action will be handled by the ‘auth’ filter 265 | /toLogin.action = auth 266 | 267 | # doc page need auth 268 | /doc/** = auth 269 | 270 | # need to permission 271 | /toMain.action = auth 272 | /**.action = perms 273 | 274 | 275 | 276 | 277 | 278 | 279 | -------------------------------------------------------------------------------- /ConfigTemplate/zh_CN/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | shiroFilter 6 | org.springframework.web.filter.DelegatingFilterProxy 7 | 8 | targetFilterLifecycle 9 | true 10 | 11 | 12 | 13 | org.springframework.web.context.ContextLoaderListener 14 | 15 | 16 | contextConfigLocation 17 | classpath:applicationContext.xml 18 | 19 | 20 | 21 | 30 | 31 | 32 | 33 | 34 | shiroFilter 35 | /* 36 | REQUEST 37 | FORWARD 38 | INCLUDE 39 | ERROR 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, and 10 | distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by the copyright 13 | owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all other entities 16 | that control, are controlled by, or are under common control with that entity. 17 | For the purposes of this definition, "control" means (i) the power, direct or 18 | indirect, to cause the direction or management of such entity, whether by 19 | contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the 20 | outstanding shares, or (iii) beneficial ownership of such entity. 21 | 22 | "You" (or "Your") shall mean an individual or Legal Entity exercising 23 | permissions granted by this License. 24 | 25 | "Source" form shall mean the preferred form for making modifications, including 26 | but not limited to software source code, documentation source, and configuration 27 | files. 28 | 29 | "Object" form shall mean any form resulting from mechanical transformation or 30 | translation of a Source form, including but not limited to compiled object code, 31 | generated documentation, and conversions to other media types. 32 | 33 | "Work" shall mean the work of authorship, whether in Source or Object form, made 34 | available under the License, as indicated by a copyright notice that is included 35 | in or attached to the work (an example is provided in the Appendix below). 36 | 37 | "Derivative Works" shall mean any work, whether in Source or Object form, that 38 | is based on (or derived from) the Work and for which the editorial revisions, 39 | annotations, elaborations, or other modifications represent, as a whole, an 40 | original work of authorship. For the purposes of this License, Derivative Works 41 | shall not include works that remain separable from, or merely link (or bind by 42 | name) to the interfaces of, the Work and Derivative Works thereof. 43 | 44 | "Contribution" shall mean any work of authorship, including the original version 45 | of the Work and any modifications or additions to that Work or Derivative Works 46 | thereof, that is intentionally submitted to Licensor for inclusion in the Work 47 | by the copyright owner or by an individual or Legal Entity authorized to submit 48 | on behalf of the copyright owner. For the purposes of this definition, 49 | "submitted" means any form of electronic, verbal, or written communication sent 50 | to the Licensor or its representatives, including but not limited to 51 | communication on electronic mailing lists, source code control systems, and 52 | issue tracking systems that are managed by, or on behalf of, the Licensor for 53 | the purpose of discussing and improving the Work, but excluding communication 54 | that is conspicuously marked or otherwise designated in writing by the copyright 55 | owner as "Not a Contribution." 56 | 57 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf 58 | of whom a Contribution has been received by Licensor and subsequently 59 | incorporated within the Work. 60 | 61 | 2. Grant of Copyright License. 62 | 63 | Subject to the terms and conditions of this License, each Contributor hereby 64 | grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, 65 | irrevocable copyright license to reproduce, prepare Derivative Works of, 66 | publicly display, publicly perform, sublicense, and distribute the Work and such 67 | Derivative Works in Source or Object form. 68 | 69 | 3. Grant of Patent License. 70 | 71 | Subject to the terms and conditions of this License, each Contributor hereby 72 | grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, 73 | irrevocable (except as stated in this section) patent license to make, have 74 | made, use, offer to sell, sell, import, and otherwise transfer the Work, where 75 | such license applies only to those patent claims licensable by such Contributor 76 | that are necessarily infringed by their Contribution(s) alone or by combination 77 | of their Contribution(s) with the Work to which such Contribution(s) was 78 | submitted. If You institute patent litigation against any entity (including a 79 | cross-claim or counterclaim in a lawsuit) alleging that the Work or a 80 | Contribution incorporated within the Work constitutes direct or contributory 81 | patent infringement, then any patent licenses granted to You under this License 82 | for that Work shall terminate as of the date such litigation is filed. 83 | 84 | 4. Redistribution. 85 | 86 | You may reproduce and distribute copies of the Work or Derivative Works thereof 87 | in any medium, with or without modifications, and in Source or Object form, 88 | provided that You meet the following conditions: 89 | 90 | You must give any other recipients of the Work or Derivative Works a copy of 91 | this License; and 92 | You must cause any modified files to carry prominent notices stating that You 93 | changed the files; and 94 | You must retain, in the Source form of any Derivative Works that You distribute, 95 | all copyright, patent, trademark, and attribution notices from the Source form 96 | of the Work, excluding those notices that do not pertain to any part of the 97 | Derivative Works; and 98 | If the Work includes a "NOTICE" text file as part of its distribution, then any 99 | Derivative Works that You distribute must include a readable copy of the 100 | attribution notices contained within such NOTICE file, excluding those notices 101 | that do not pertain to any part of the Derivative Works, in at least one of the 102 | following places: within a NOTICE text file distributed as part of the 103 | Derivative Works; within the Source form or documentation, if provided along 104 | with the Derivative Works; or, within a display generated by the Derivative 105 | Works, if and wherever such third-party notices normally appear. The contents of 106 | the NOTICE file are for informational purposes only and do not modify the 107 | License. You may add Your own attribution notices within Derivative Works that 108 | You distribute, alongside or as an addendum to the NOTICE text from the Work, 109 | provided that such additional attribution notices cannot be construed as 110 | modifying the License. 111 | You may add Your own copyright statement to Your modifications and may provide 112 | additional or different license terms and conditions for use, reproduction, or 113 | distribution of Your modifications, or for any such Derivative Works as a whole, 114 | provided Your use, reproduction, and distribution of the Work otherwise complies 115 | with the conditions stated in this License. 116 | 117 | 5. Submission of Contributions. 118 | 119 | Unless You explicitly state otherwise, any Contribution intentionally submitted 120 | for inclusion in the Work by You to the Licensor shall be under the terms and 121 | conditions of this License, without any additional terms or conditions. 122 | Notwithstanding the above, nothing herein shall supersede or modify the terms of 123 | any separate license agreement you may have executed with Licensor regarding 124 | such Contributions. 125 | 126 | 6. Trademarks. 127 | 128 | This License does not grant permission to use the trade names, trademarks, 129 | service marks, or product names of the Licensor, except as required for 130 | reasonable and customary use in describing the origin of the Work and 131 | reproducing the content of the NOTICE file. 132 | 133 | 7. Disclaimer of Warranty. 134 | 135 | Unless required by applicable law or agreed to in writing, Licensor provides the 136 | Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, 137 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, 138 | including, without limitation, any warranties or conditions of TITLE, 139 | NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are 140 | solely responsible for determining the appropriateness of using or 141 | redistributing the Work and assume any risks associated with Your exercise of 142 | permissions under this License. 143 | 144 | 8. Limitation of Liability. 145 | 146 | In no event and under no legal theory, whether in tort (including negligence), 147 | contract, or otherwise, unless required by applicable law (such as deliberate 148 | and grossly negligent acts) or agreed to in writing, shall any Contributor be 149 | liable to You for damages, including any direct, indirect, special, incidental, 150 | or consequential damages of any character arising as a result of this License or 151 | out of the use or inability to use the Work (including but not limited to 152 | damages for loss of goodwill, work stoppage, computer failure or malfunction, or 153 | any and all other commercial damages or losses), even if such Contributor has 154 | been advised of the possibility of such damages. 155 | 156 | 9. Accepting Warranty or Additional Liability. 157 | 158 | While redistributing the Work or Derivative Works thereof, You may choose to 159 | offer, and charge a fee for, acceptance of support, warranty, indemnity, or 160 | other liability obligations and/or rights consistent with this License. However, 161 | in accepting such obligations, You may act only on Your own behalf and on Your 162 | sole responsibility, not on behalf of any other Contributor, and only if You 163 | agree to indemnify, defend, and hold each Contributor harmless for any liability 164 | incurred by, or claims asserted against, such Contributor by reason of your 165 | accepting any such warranty or additional liability. 166 | 167 | END OF TERMS AND CONDITIONS 168 | 169 | APPENDIX: How to apply the Apache License to your work 170 | 171 | To apply the Apache License to your work, attach the following boilerplate 172 | notice, with the fields enclosed by brackets "{}" replaced with your own 173 | identifying information. (Don't include the brackets!) The text should be 174 | enclosed in the appropriate comment syntax for the file format. We also 175 | recommend that a file or class name and description of purpose be included on 176 | the same "printed page" as the copyright notice for easier identification within 177 | third-party archives. 178 | 179 | Copyright 2016 ushelp 180 | 181 | Licensed under the Apache License, Version 2.0 (the "License"); 182 | you may not use this file except in compliance with the License. 183 | You may obtain a copy of the License at 184 | 185 | http://www.apache.org/licenses/LICENSE-2.0 186 | 187 | Unless required by applicable law or agreed to in writing, software 188 | distributed under the License is distributed on an "AS IS" BASIS, 189 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 190 | See the License for the specific language governing permissions and 191 | limitations under the License. 192 | -------------------------------------------------------------------------------- /LockLogin Management/locklogin/admin.jsp: -------------------------------------------------------------------------------- 1 | <%@page import="java.text.SimpleDateFormat"%> 2 | <%@page import="cn.easyproject.easyshiro.EasyLockUser"%> 3 | <%@page import="net.sf.ehcache.Cache"%> 4 | <%@page import="net.sf.ehcache.CacheManager"%> 5 | <%@page import="org.apache.shiro.SecurityUtils"%> 6 | <%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 7 | <%! 8 | String lockLogin="shiro-lockLoginCache"; 9 | String lockLCheck="shiro-lockCheckCache"; 10 | 11 | Cache cache=CacheManager.getInstance().getCache(lockLogin); 12 | Cache cache2=CacheManager.getInstance().getCache(lockLCheck); 13 | 14 | /** 15 | * 清除所有锁定用户和IP信息 16 | */ 17 | public void unlockAll(){ 18 | cache.removeAll(); 19 | cache2.removeAll(); 20 | } 21 | 22 | 23 | public void unlock(String key){ 24 | cache.remove(key); 25 | cache2.remove(key); 26 | } 27 | %> 28 | <% 29 | String path = request.getContextPath(); 30 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 31 | 32 | String t=request.getParameter("t"); 33 | if(t!=null){ 34 | 35 | if(t.equals("unlock")){ 36 | String key=request.getParameter("v"); 37 | unlock(request.getParameter("v")); 38 | %> 39 | 43 | 44 | <% 45 | }else if(t.equals("clearAll")){ 46 | unlockAll(); 47 | %> 48 | 52 | 53 | <% 54 | 55 | } 56 | 57 | } 58 | 59 | %> 60 | 61 | 62 | 63 | 64 | 65 | 66 | EasyShiro LockLogin Manager 67 | 68 | 69 | 70 | 71 | 72 | 73 | 93 | 94 | 95 | 96 |
97 |

EasyShiro LockLogin Management

98 |
99 | 100 | 108 |
109 | <% 110 | 111 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 112 | 113 | // Search 114 | String name=request.getParameter("name"); 115 | if(name!=null&& (!name.trim().equals(""))){ 116 | String lockinfo=null; 117 | name=name.toLowerCase(); 118 | String key1="user:"+name; 119 | String key2="ip:"+name; 120 | if(cache.get(key1)!=null){ 121 | 122 | EasyLockUser user=(EasyLockUser)(cache.get(key1).getObjectValue()); 123 | %> 124 |
125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 |
TypeValueUnlock TimeUnlock
User${param.name }<%=sdf.format(new Date(cache.get(key1).getExpirationTime())) %>
142 |
143 | <% 144 | }else if(cache.get(key2)!=null){ 145 | EasyLockUser user=(EasyLockUser)(cache.get(key2).getObjectValue()); 146 | %> 147 |
148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 |
TypeValueUnlock TimeUnlock
IP${param.name }<%=sdf.format(new Date(cache.get(key2).getExpirationTime())) %>
164 |
165 | <% 166 | }else{ 167 | %> 168 |
169 | '${param.name }' no lock information! 170 |
171 | 172 | <% 173 | } 174 | }else{ 175 | %> 176 |
177 | EasyShiro locked result. 178 |
179 | 180 | <% 181 | 182 | } 183 | 184 | %> 185 | 186 |
187 |
188 | EasyShiro - DESIGN BY EasyProject© 189 |
190 | 191 | <%-- <%=cache.getKeys() %> --%> 192 | 193 | 194 | -------------------------------------------------------------------------------- /doc/images/locklogin1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ushelp/EasyShiro/e13610de5439d9e6eb38c0c98db8f6524d7385ea/doc/images/locklogin1.png -------------------------------------------------------------------------------- /doc/images/locklogin2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ushelp/EasyShiro/e13610de5439d9e6eb38c0c98db8f6524d7385ea/doc/images/locklogin2.png -------------------------------------------------------------------------------- /doc/images/locklogin3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ushelp/EasyShiro/e13610de5439d9e6eb38c0c98db8f6524d7385ea/doc/images/locklogin3.png -------------------------------------------------------------------------------- /doc/images/locklogin4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ushelp/EasyShiro/e13610de5439d9e6eb38c0c98db8f6524d7385ea/doc/images/locklogin4.png -------------------------------------------------------------------------------- /doc/images/locklogin5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ushelp/EasyShiro/e13610de5439d9e6eb38c0c98db8f6524d7385ea/doc/images/locklogin5.png -------------------------------------------------------------------------------- /doc/images/rbca-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ushelp/EasyShiro/e13610de5439d9e6eb38c0c98db8f6524d7385ea/doc/images/rbca-en.png -------------------------------------------------------------------------------- /doc/images/rbca.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ushelp/EasyShiro/e13610de5439d9e6eb38c0c98db8f6524d7385ea/doc/images/rbca.png -------------------------------------------------------------------------------- /libs/easyshiro-2.6.0-RELEASE-javadoc.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ushelp/EasyShiro/e13610de5439d9e6eb38c0c98db8f6524d7385ea/libs/easyshiro-2.6.0-RELEASE-javadoc.jar -------------------------------------------------------------------------------- /libs/easyshiro-2.6.0-RELEASE-sources.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ushelp/EasyShiro/e13610de5439d9e6eb38c0c98db8f6524d7385ea/libs/easyshiro-2.6.0-RELEASE-sources.jar -------------------------------------------------------------------------------- /libs/easyshiro-2.6.0-RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ushelp/EasyShiro/e13610de5439d9e6eb38c0c98db8f6524d7385ea/libs/easyshiro-2.6.0-RELEASE.jar -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # EasyShiro 2 | 3 | --------------- 4 | 5 | EasyShiro 是一个基于 Shiro 的安全扩展组件。为基于数据库权限管理和 **Web URL 授权** 的 RBAC(Role Based Access Control) Web 权限模型,提供通用的 Shiro 安全管理支持,以及更加丰富强大的功能选项。 6 | 7 | 8 | EasyShiro is a security extension components based Shiro. Based on the RBAC (Role Based Access Control) Web permission model based on database rights management and **Web URL authorization**, provides general Shiro security management support, as well as richer and more powerful function options. 9 | 10 | 11 | Support version: `Shiro 1.2.X`, `Shiro 1.3.X`, `Shiro 1.4.X` 12 | 13 | 14 | ## Featuter/特点 15 | 16 | - **中文** 17 | 18 | 1. 支持基于基于数据库权限管理和 **Web URL** 授权的 RBAC 权限管理 19 | 20 | 2. 增强简化的 Shiro 统一组件支持。提供通用的 **验证码**,**自动登录**,**登录锁定**,**错误消息配置**,**拦截器**,**Ajax 响应** 等等支持 21 | 22 | 3. 配置简单,简化安全集成,减少 Shiro 的复杂性。提供了完整的**通用配置模板**(`shiro.ini`, `spring-shiro.xml`)仅需加入 `jar` 包,按需求调整部分配置选项,即可完成集成,享受完整的 Shiro 支持 23 | 24 | 4. 基于 `User` 和 `IP` 的 **LockLogin** 登录锁定功能,并提供登录锁定管理系统 **LockLoginManagement** 25 | 26 | - **English** 27 | 28 | 1. Support RBAC rights management based on database rights management and **Web URL** authorizations 29 | 30 | 2. Enhanced simplified Shiro unified component support. Provide common **CAPTCHA**, **Automatic login**, **Login lock**, **Error message configuration**, **Interceptor**, **Ajax response**, etc. support 31 | 32 | 3. Simplifies configuration and simplifies security integration, reducing Shiro's complexity. Just add the `jar` package and adjust some of the configuration( `Shiro.ini`,` spring-shiro.xml`) options as required to complete the integration and enjoy the complete Shiro stand by 33 | 34 | 4. **LockLogin** login lock based on `User` and` IP` and provides login lock management system **LockLoginManagement** 35 | 36 | 37 | ## LockLogin Management/登录锁定管理系统 38 | 39 | 支持基于 `User` 和 `IP` 的锁定控制,及基于 IP 的`验证码是否显示`控制。 40 | 41 | Supports lock control based on `User` and `IP`, and IP-based `whether CAPTCHA display `control. 42 | 43 | ![LockLogin](doc/images/locklogin1.png) 44 | 45 | ![LockLogin](doc/images/locklogin2.png) 46 | 47 | ![LockLogin](doc/images/locklogin3.png) 48 | 49 | ![LockLogin](doc/images/locklogin4.png) 50 | 51 | ![LockLogin](doc/images/locklogin5.png) 52 | 53 | 54 | 55 | ## Maven 56 | 57 | ```XML 58 | 59 | cn.easyproject 60 | easyshiro 61 | 2.6.0-RELEASE 62 | 63 | 64 | 102 | ``` 103 | 104 | 105 | 106 | ## Document/文档 107 | 108 | ### 中文 109 | 110 | [中文说明文档](doc/readme-zh-CN.md) 111 | 112 | [官方主页](http://www.easyproject.cn/easyshiro/zh-cn/index.jsp '官方主页') 113 | 114 | [留言评论](http://www.easyproject.cn/easyshiro/zh-cn/index.jsp#donation '留言评论') 115 | 116 | 如果您有更好意见,建议或想法,请联系我。 117 | 118 | ### English 119 | 120 | [English Readme](doc/readme-en.md) 121 | 122 | [The official home page](http://www.easyproject.cn/easyshiro/en/index.jsp 'The official home page') 123 | 124 | [Comments](http://www.easyproject.cn/easyshiro/en/index.jsp#donation 'Comments') 125 | 126 | If you have more comments, suggestions or ideas, please contact me. 127 | 128 | ## End 129 | 130 | Email: 131 | 132 | [http://www.easyproject.cn](http://www.easyproject.cn "EasyProject Home") 133 | 134 | 135 | **Donation/捐助:** 136 | 137 | 138 | 
139 | 支付宝/微信/QQ/云闪付/PayPal 扫码支付 140 |
支付宝/微信/QQ/云闪付/PayPal
141 | 142 |
143 | 144 | 我们相信,每个人的点滴贡献,都将是推动产生更多、更好免费开源产品的一大步。 145 | 146 | **感谢慷慨捐助,以支持服务器运行和鼓励更多社区成员。** 147 | 148 | We believe that the contribution of each bit by bit, will be driven to produce more and better free and open source products a big step. 149 | 150 | **Thank you donation to support the server running and encourage more community members.** 151 | 152 | 153 | --------------------------------------------------------------------------------