https://github.com/temilaj/asp.net-core-role-based-authentication
Code sample detailing role-based authentication and custom role creation in ASP.NET core (1.x and 2.x)
https://github.com/temilaj/asp.net-core-role-based-authentication
asp-net asp-net-core asp-net-core-mvc aspnetcore authorization role-based-access-control role-manager
Last synced: 3 months ago
JSON representation
Code sample detailing role-based authentication and custom role creation in ASP.NET core (1.x and 2.x)
- Host: GitHub
- URL: https://github.com/temilaj/asp.net-core-role-based-authentication
- Owner: temilaj
- License: mit
- Created: 2017-02-13T17:13:58.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-28T11:01:53.000Z (over 8 years ago)
- Last Synced: 2025-08-26T01:26:57.715Z (10 months ago)
- Topics: asp-net, asp-net-core, asp-net-core-mvc, aspnetcore, authorization, role-based-access-control, role-manager
- Language: C#
- Homepage: https://gooroo.io/GoorooTHINK/Article/17333/Custom-user-roles-and-rolebased-authorization-in-ASPNET-core/28352#.WLQMoxIrKu4
- Size: 571 KB
- Stars: 77
- Watchers: 5
- Forks: 25
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ASP.NET Core role based authentication and custom role creation
Code sample detailing how to create custom roles in ASP.NET core on startup and role-based authentication using role checks and policy based checks.
## This application consists of:
* Sample pages using ASP.NET Core MVC
* [Bower](https://go.microsoft.com/fwlink/?LinkId=518004) for managing client-side libraries
* Theming using [Bootstrap](https://go.microsoft.com/fwlink/?LinkID=398939)
## Installing
clone or download this repo into your local computer, check-in to the root directory of the app and run the app
### [ASP.NET core 1.x](https://github.com/temilaj/ASP.NET-core-role-based-authentication/tree/version/dotnet-core-1-1)
### [ASP.NET core 2.x](https://github.com/temilaj/ASP.NET-core-role-based-authentication/tree/version/dotnet-core-2-0)
## Run & Deploy
restore the .NET core packages described in the `package.json`, install the npm and bower dependencies,and then update database with the migrations and run the project:
```bash
dotnet run
```
the `dotnet run` command simultaneously re-compiles and runs the `kestrel-server`.
I would love to hear your [feedback](https://temilajumoke.com)