refactor access control middleware and user access by JWT groups

Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
This commit is contained in:
bcmmbaga
2024-09-16 13:33:36 +03:00
parent 1ef51a4ffa
commit 258b30cf48
5 changed files with 51 additions and 18 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ func APIHandler(ctx context.Context, accountManager s.AccountManager, LocationMa
acMiddleware := middleware.NewAccessControl(
authCfg.Audience,
authCfg.UserIDClaim,
accountManager.GetUser)
accountManager.GetUserByID)
rootRouter := mux.NewRouter()
metricsMiddleware := appMetrics.HTTPMiddleware()