@ -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) {