feat(auth): 添加JWT与Casbin权限认证功能

This commit is contained in:
unclesam committed 2026-07-07 20:24:30 +08:00
1 parent fe86c081f4
commit 16a9f64109
9 files changed
+236 -27

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
# Request definition
[request_definition]
r = sub, obj, act
# Policy definition
[policy_definition]
p = sub, obj, act
# Role definition
[role_definition]
g = _, _
# Policy effect
[policy_effect]
e = some(where (p.eft == allow))
# Matchers
[matchers]
m = r.sub == "unclesam" || g(r.sub, p.sub) && keyMatch2(r.obj, p.obj) && regexMatch(r.act, p.act)