leniu-security-guard
Installation
SKILL.md
leniu-security-guard
认证注解
所有注解包路径:net.xnzn.framework.secure.filter.annotation.*
| 注解 | 用途 |
|---|---|
@RequiresAuthentication |
需要登录认证(最常用,类/方法级) |
@RequiresGuest |
允许游客访问(公开接口) |
@RequiresPermissions |
需要指定权限码 |
@RequiresRoles |
需要指定角色 |
@RequiresUser |
需要用户登录 |
@RequiresHeader |
需要指定请求头 |
Controller 认证示例
import net.xnzn.framework.secure.filter.annotation.RequiresAuthentication;
Related skills