Refactoring connections and connectors for authentication support