This is a simple multi tenant API that implements AUTH flow using JSON web Token, this API uses the AuthPermissions.AspNetCore library created by * Jon P. Smith
The below image shows the relationships between the entities in the AuthPermissions.AspNetCore library
When running the code, you have to first get authenticated, the below shows how to do that
Steps:
* Run the code and open the Swagger UI
* Execute the Authentication Endpoint ("api/authenticate/authuser") the enpoint expects an object {email: "[email protected]", password: "[email protected]"}, use one of the autogenerated users [Email:[email protected] Password: [email protected], Email:[email protected] Password: [email protected]], you can test with the other users, you can get them in the "PermissionCode/AppAuthSetupData.cs" folder
* The endpoint returns a JSON Web Token for the user, put this token in the Authorize box in swagger
* Test the Tenant User endpoint ("api/TenantUser/usertenant") this endpoint returns the Tenant Name of the logged in user