dotnet run --project PatientAPI/PatientAPI.csproj
dotnet test
Credentials : [email protected] | test
API:
- Create a new .NET project that will host three endpoints:
- GET /patients
- GET /patients/{patientId}
- POST /login (This should take in an email and password and return the auth information else 401 if the creds are invalid. You may stub/hardcode this.)
- Endpoints should be protected by authentication. You may stub/hardcode this but callers must provide an auth header of the form: "Bearer {authToken}"
- The patient endpoints should internally call into a patient-service API that we have provided for you at the following url: https://ti-patient-service.azurewebsites.net
- Fetch the list of patients by sending a GET request to /patients
- Fetch a specific patient by sending a GET request to /patient/{patientId}
- There is no authentication for these endpoints
- Your API project should not expose the patient IDs from the patient-service API. Provide an alternative method of addressing specific patients that your front end will use when calling your API.
- Make use of dependency injection and class interfaces. You can use whatever DI framework you wish.
- Make use of a configuration file to store the URL for the patient-service API (and any other values you wish). This should be the only place in your code where the URL for the patient-service is stored.
- Separate the code for calling the patient-service API into its own class with an interface. Register this class to be used with your dependency injection framework and use that injection in your code where appropriate.
- Your application can be structured in anyway that you choose, other than these requirements.