Swift Middleware Provider for Gate