In a .Net Core 2.0 WebAPI. It is accessed internally by a few applications. However there is an expectation that each application will pass through the username & password to the Web API, that it will use to access the database, using EFCore 2.0.
When the Application makes a call to the API, it might be that there are a few queries that are ran during that connection. We want to make sure that the the context that is used for App1, isn't then the same one used by App2. We don't want the WebAPI to have to store usernames & passwords.
The Apps are Asp.Net Core 2.0 applications, as is the Web API.
App1 ---|
App2 ---| --> WebAPI Endpoint --> EF --> DB.
App3 ---|
Is there a way of setting the WebAPI Startup to handle this scenario?