• Stars
    star
    298
  • Rank 139,663 (Top 3 %)
  • Language SCSS
  • License
    Apache License 2.0
  • Created over 7 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Jwt Authentication without ASP.NET Core Identity

Jwt Authentication without ASP.NET Core Identity 7x

GitHub Actions status

jwtauth

A Jwt based authentication sample for ASP.NET Core 7x without using the Identity system. It includes:

  • Users and Roles tables with a many-to-may relationship.
  • A separated EF Core data layer with enabled migrations.
  • An EF Core 7x based service layer.
  • A Db initializer to seed the default database values.
  • An account controller with Jwt and DB based login, custom logout and refresh tokens capabilities.
  • 2 sample API controllers to show how user-roles can be applied and used.
  • A Jwt validator service to show how to react to the server side changes to a user's info immediately.
  • An Angular 7.0+ Client. It contains:
    • A JWT-based Login page.
    • Handling how and where to store the tokens.
    • How to handle refresh tokens mechanism, using reactive timers.
    • How to validate the expiration date of a token.
    • How to decode an access token and extract the user's roles from it.
    • Authorizing access to a module via a route guard based on the user's roles.
    • How to hide or display different parts of a page based on the user's roles.
    • Adding a JWT token to the HTTP requests required authorized access automatically.
    • Handling server side unauthorized errors automatically.

How to run the Angular 7.0+ Client

  • Update all of the outdated global dependencies using the npm update -g command.
  • Install the Angular-CLI.
  • Open a command prompt console and then navigate to src/ASPNETCore2JwtAuthentication.AngularClient/ folder.
  • Now run the following commands:
npm update -g
npm install
_2-ng-build-dev.bat
  • Then open another command prompt console and navigate to src/ASPNETCore2JwtAuthentication.WebApp/ folder.
  • Now run the following commands:
dotnet restore
dotnet watch run

More Repositories

1

EFCoreSecondLevelCacheInterceptor

EF Core Second Level Cache Interceptor
C#
635
star
2

iTextSharp.LGPLv2.Core

iTextSharp.LGPLv2.Core is an unofficial port of the last LGPL version of the iTextSharp (V4.1.6) to .NET Core
C#
551
star
3

EPPlus.Core

EPPlus.Core is an unofficial port of the EPPlus library to .NET Core
C#
369
star
4

PdfReport.Core

PdfReport.Core is a code first reporting engine, which is built on top of the iTextSharp.LGPLv2.Core and EPPlus.Core libraries
C#
350
star
5

EFSecondLevelCache.Core

Entity Framework Core Second Level Caching Library
C#
329
star
6

OpenCVSharp-Samples

A collection of samples about using OpenCV in .NET applications.
C#
257
star
7

DNTPersianUtils.Core

DNTPersianUtils.Core is a collection of Persian helper extension methods
C#
236
star
8

DNTIdentity

A highly customized sample of the ASP.NET Core Identity
C#
232
star
9

DNTCaptcha.Core

DNTCaptcha.Core is a captcha generator and validator for ASP.NET Core applications
SCSS
205
star
10

GitHubFolderDownloader

It lets you to download a single folder of a repository without cloning or downloading the whole repository.
C#
164
star
11

Process-Proxifier

Using FiddlerCore to add proxy settings to the Windows applications
C#
151
star
12

DNTCommon.Web.Core

DNTCommon.Web.Core provides common scenarios' solutions for ASP.NET Core applications.
C#
130
star
13

PdfReport

PdfReport is a code first reporting engine, which is built on top of the iTextSharp and EPPlus libraries.
C#
91
star
14

EnglishToPersianDictionaries

A collection of English to Persian dictionaries
Java
87
star
15

EFSecondLevelCache

Entity Framework 6.x Second Level Caching Library.
C#
65
star
16

DNTProfiler

DNTProfiler is an EF 6.x and NH 4.x profiler.
C#
59
star
17

PersianBingCalendar

Bing daily wallpaper images with Persian calendar
C#
58
star
18

DNTScanner.Core

DNTScanner.Core is a .NET 4x and .NET Core 2x+ wrapper for the Windows Image Acquisition library.
C#
57
star
19

IdentityServerImageGallery

How to use IdentityServer 4.x with an ASP.NET Core app
C#
55
star
20

JwtWithWebAPI

Creating a RESTful API with authentication using Web API 2.x and JSON Web Tokens
JavaScript
44
star
21

DNTScheduler.Core

DNTScheduler.Core is a lightweight ASP.NET Core's background tasks runner and scheduler
C#
44
star
22

DNTPersianComponents.Blazor

A collection of Persian components for Blazor
SCSS
39
star
23

DNTBreadCrumb.Core

DNTBreadCrumb.Core Creates custom bread crumb definitions, based on Twitter Bootstrap features for ASP.NET Core applications.
SCSS
32
star
24

AspNetIdentityDependencyInjectionSample

ASP.NET Identity Dependency Injection Sample
JavaScript
31
star
25

ASPNETCore2CookieAuthentication

Cookie Authentication without ASP.NET Core Identity 7x
SCSS
31
star
26

angular-template-driven-forms-lab

A collection of tips and tricks about how to use an Angular (2+) app with an ASP.NET Core app.
TypeScript
30
star
27

DNTCaptcha.Blazor

A captcha generator for the Blazor based applications.
SCSS
30
star
28

AutoMapperSamples

Using AutoMapper with Entity Framework.
C#
26
star
29

QueryingInEFCore

Querying in Entity Framework Core
C#
25
star
30

IranianITBloggers

A collection of RSS feeds of Iranian IT bloggers
25
star
31

DNTScheduler

DNTScheduler is a super simple ASP.NET's background tasks runner and scheduler.
C#
24
star
32

MvcPlugin

How to create plugins for ASP.NET MVC 4.x/5.x applications.
C#
22
star
33

SubtitleTools

SubtitleTools is a small utility that helps modifying existing subtitles or downloading new ones
C#
21
star
34

AngularMaterialLab

A collection of tips and tricks about how to use an Angular Material 9x app with an ASP.NET Core app
TypeScript
21
star
35

HotelManagementSample

This is a sample project to demonstrate how to work with EF-Core, Web-API, ASP.NET Core identity, Blazor Wasm and Blazor Server
C#
20
star
36

BlazorWasmDynamicPermissions

Blazor WASM Dynamic Permissions
SCSS
19
star
37

KendoUI-Samples

Using KendoUI with ASP.NET.
JavaScript
16
star
38

Exports

Expotred files of the .NET Tips.
C#
15
star
39

WpfFramework

Using Entity framework code-first and unit of work pattern with WPF applications.
C#
14
star
40

DntConsole

This a .NET 7x console app template
C#
14
star
41

KendoUI.Core.Samples

Using KendoUI with ASP.NET Core
JavaScript
14
star
42

SignalR-Samples

Using SiganlR in ASP.NET applications.
JavaScript
13
star
43

Froala-Sample

Using Froala WYSIWYG Editor with ASP.NET
JavaScript
12
star
44

Dependency-Injection-Samples

.NET Dependency Injection Samples
C#
12
star
45

ElmahEFLogger

Global exceptions logger for Entity Framework 6.x using ELMAH
C#
12
star
46

Solution-Template-Generator

Solution template generator, gets a .SLN file containing multiple projects and then converts it to a .VSIX file
C#
12
star
47

jqGrid-Samples

Using jqGrid with ASP.NET MVC
JavaScript
11
star
48

DNTBreadCrumb

DNTBreadCrumb Creates custom bread crumb definitions, based on Twitter Bootstrap 3.x features
C#
11
star
49

MVC5Angular2

Using AngularJS 2.0 with ASP.NET MVC 5.x
TypeScript
11
star
50

ApiUrlsGenerator

This library will help you to convert your `stringly typed` API URL's to strongly typed ones
C#
8
star
51

Mvc-App-Persian-DatePicker

Using JavaScript PersianDatePicker in ASP.NET applications.
CSS
7
star
52

UoW-Sample

Using multiple databases with EF Code First, UoW & DI patterns.
C#
7
star
53

EFCoreSQLiteFTS

Implementing full-text search with SQLite and EF-Core
C#
7
star
54

AOP-Sample

AOP Samples, mostly using StructureMap & Castle.Core
C#
4
star
55

Silverlight-Persian-DatePicker

Silverlight 4 & 5 Persian DatePicker
C#
3
star
56

DntSite

این پروژه، سورس کامل و در حال استفاده‌ی وب‌سایت «دات‌نت تيپس» است
C#
3
star
57

MVC-Samples

ASP.NET MVC Step By Step
C#
3
star
58

MVC-Ajax-Form-Upload

Adding file upload support to Ajax.BeginForm
JavaScript
3
star
59

ExplorerPCal

Replacing the default Windows calendar with .NET hooks
C#
3
star
60

ProxyValidator

An automated service for validating free to use proxy servers
C#
2
star
61

RemovePdfLinks

Pdf Links Remover.
C#
1
star
62

Disposable-Email-Address-Detector

Using nameapi.org's API in .NET
C#
1
star
63

OpenAPISwaggerDoc

This is a sample project to show how to use the OpenAPI Swagger in .NET apps
C#
1
star
64

.NET-Persian-Subtitles

Persian subtitles for the various .NET related courses
HTML
1
star
65

OxyPlotWpfTests

An OxyPlot Sample
C#
1
star