-
Notifications
You must be signed in to change notification settings - Fork 159
Roles explained
An AuthP's Role represent a set of features on your application that a user (human or machine) can access. Roles are normally named after the user's job, say "Sales Person", "Sales Manager", and so on. These Roles manage what pages/WebAPIs a logged in user can access.
The idea of using Roles started in ASP.NET MVC and is in ASP.NET Core. In ASP.NET Roles are hard-coded into your application via the [Authorize(Roles = "Sales Person,Sales Manager")]
. The downsides of the ASP.NET Roles approach are:
- If you want to change what a Role can access you need to edit your application and redeploy it.
- In larger applications the authorize attributes get pretty long (e.g.
[Authorize(Roles = “Staff, SalesManager , DevManage, Admin, SuperAdmin”)]
) and hard to manage.
The AuthP's library keeps the Roles concept for users, but provides a lower-level concept called Permissions that manage what pages/WebAPIs can be accessed. The mapping from a user to Permissions is held in a database so that you can use AuthP's admin features:
- Change what Permissions (i.e. what pages/WebAPI can be accessed) are in a AuthP's Role.
- Change want AuthP's Roles a user has.
The end result is you have a cleaner implementation of the Roles concept, and a more manageable pages/WebAPI scheme.
- Intro to multi-tenants (ASP.NET video)
- Articles in date order:
- 0. Improved Roles/Permissions
- 1. Setting up the database
- 2. Admin: adding users and tenants
- 3. Versioning your app
- 4. Hierarchical multi-tenant
- 5. Advanced technique with claims
- 6. Sharding multi-tenant setup
- 7. Three ways to add new users
- 8. The design of the sharding data
- 9. Down for maintenance article
- 10: Three ways to refresh claims
- 11. Features of Multilingual service
- 12. Custom databases - Part1
- Videos (old)
- Authentication explained
- Permissions explained
- Roles explained
- AuthUser explained
- Multi tenant explained
- Sharding explained
- How AuthP handles sharding
- How AuthP handles errors
- Languages & cultures explained
- JWT Token refresh explained
- Setup Permissions
- Setup Authentication
- Startup code
- Setup the custom database feature
- JWT Token configuration
- Multi tenant configuration
- Using Permissions
- Using JWT Tokens
- Creating a multi-tenant app
- Supporting multiple languages
- Unit Test your AuthP app