# free-security **Repository Path**: jokerjt/free-security ## Basic Information - **Project Name**: free-security - **Description**: free-Security 一款基于rbac设计理念的认证授权安全框架,只需简单配置即可开箱即用。 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 6 - **Forks**: 0 - **Created**: 2024-06-25 - **Last Updated**: 2025-04-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: RBAC, Java, Spring ## README # free-security #### 介绍 free-Security 的工作原理是利用springboot的自动装配机制通过FilterRegistrationBean注册到ioc容器中。 当请求发生时,它会经过filter过滤器链。FilterRegistrationBean中注册的代理FilterProxy也是一个filter,采用过滤器链式实现了一系列自定义Handler。同时使用UserContext(ThreadLocal)存储用户登录信息。集成了jwt工具类用于生成token。 另外包括不限于密码校验,黑名单验证,Xss攻击防御,csrf攻击防御,自定义安全过滤等。 项目整体采用依赖倒置原则,开放接口给使用者。配置轻量级 #### 软件架构 软件架构说明 流程图如下 ![free-security流程图](free-security流程图.png) 认证:UsernamePasswordAuthoricationHandler 授权:AuthorizationHandler 自定义授权:实现AuthertizerAble接口,重写haveAuthority方法 #### 安装教程 1. maven项目 #### 使用说明 1. 使用详情可见demo(还在整理....) #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)