Add digest authentication for API methods.