feat: add simple auth api

This commit is contained in:
weloe
2023-05-10 16:00:09 +08:00
parent a51ba879a1
commit a89c28076a
8 changed files with 157 additions and 0 deletions

View File

@@ -26,6 +26,10 @@ type IEnforcer interface {
CheckLogin(ctx ctx.Context) error
SetAuth(manager interface{})
CheckRole(ctx ctx.Context, role string) error
CheckPermission(ctx ctx.Context, permission string) error
SetType(t string)
GetType() string
GetAdapter() persist.Adapter