hard
Legacy Code Refactoring
Refactor a legacy Python class to adhere to SOLID principles.
📝 محتوى الأمر
Refactor the provided hypothetical Python class that handles user authentication and database connections directly. Break it down into separate classes adhering to the Single Responsibility Principle and Dependency Inversion Principle. Implement an interface for the database connection to allow for mocking in tests.