diff --git a/server/auth/auth.go b/server/auth/auth.go index 829f8f6..561a461 100644 --- a/server/auth/auth.go +++ b/server/auth/auth.go @@ -90,6 +90,7 @@ func (auth *AuthService) Logout(w http.ResponseWriter) { httputil.WriteJSON(w, "ok") } +// Middleware checks if the user is logged or not and if it has all fo the permissions set in "config.WithPermissions" func (auth *AuthService) Middleware(config *AuthMiddlewareConfig) func(http.Handler) http.Handler { return func(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {