... or leave it like it is and:
- Remove just the authentication from the database provider.
- Introduce a CredentialProvider that can be consumed by the MongoClientProviderComponent (0..n static)
- CredentialProvider provides one or more MongoCredentials for one or more clientIds (MongoClientProvider)
The database provider would do nothing else than just return a database (I think it is ok). MongoClientProvider, MongoDatabaseProviderand MongoCredentialProvider are well separated. So if a database provider needs authentication, a MongoCredentialProvider can be used for one or more clientId's.
Mark