Sample project for demonstrating API testing with Postman.
Project for authorization and authentication of custom API. Standalone Identity server is used.
Default local address for identity server is http://localhost:5001.
Config:
- scope: "api1"
- client:
- client_id: "client"
- grant_type: "password"
- allowed scopes: "api1", "openid", "profile", "role"
- users:
- alice/password (admin user)
- bob/password (common user)
Sample API for manipulation of workshops and its attendees. Default local address for this API is http://localhost:5000.
Complete API documentation can be found at http://localhost:5000/swagger after staring the service locally.
In order to use, you have to set following values in appconfig.json:
ApiJwtAuthorization.Authority - URL of used identity server (use "http://localhost:5001" for default Identity Server)
ConnectionStrings.DefaultConnection - connection string for Microsoft SQL database that will hold the data
Azure Function that mocks generating of invoices for workshop attendees. The function is run every 15 seconds, checks for workshop attendee records without generated invoices and marks invoice generated flag in them. In order to use locally, you have to add file local.settings.json with following contents:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "<Azure Storage connection string>",
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"ConnectionString": "<Microsoft SQL database connection string>"
}
}
Note: You can use Azure Storage Emulator.
Exported Postman test collections for API.