Update scope validator

This commit is contained in:
NipuniBhagya 2025-05-18 13:07:08 +05:30
parent 33671e6dd1
commit 5b1daaefc3
6 changed files with 52 additions and 51 deletions

View file

@ -92,11 +92,11 @@ func main() {
os.Exit(1)
}
// 5. (Optional) Build the policy engine
engine := &authz.DefaultPolicyEngine{}
// 5. (Optional) Build the access controler
accessController := &authz.ScopeValidator{}
// 6. Build the main router
mux := proxy.NewRouter(cfg, provider, engine)
mux := proxy.NewRouter(cfg, provider, accessController)
listen_address := fmt.Sprintf(":%d", cfg.ListenPort)