API with SignalR, Localization, Caching, Logging, JWT, Identity Server, Session Management, Multi Tenancy. [Angular FE Repo https://github.com/karthikeyan-1234/EmployeeAPP_D281221] The Front end which consumes this API is in repo https://github.com/karthikeyan-1234/EmployeeAPP_D281221. To Use :
- Register a Tenant with a unique TenantID. [api/Authenticate/register-tenant]
- Register an Admin by providing the required details along with a valid TenantID. [api/Authenticate/register-admin]
- Login by providing just the Username and Password [api/Authenticate/login].
- Above call will return a JWT token and a refresh token. Use them to call the Application APIs.
- SessionMiddleWare component of the application API will extract the TenantID and EmailID from the user claims present in the httpContext and store them in separate sessions.
- In the OnConfiguring method of the DBContext, the TenantID is extracted from Session
- In the OnModelCreating method of the DBContext, use the TenantID to apply a global filter, using [modelBuilder.Entity().HasQueryFilter(e => e.TenantId == TenantID)].