All Projects → Longfld → ASPNETcoreAngularJWT

Longfld / ASPNETcoreAngularJWT

Licence: MIT License
Angular in ASP.NET Core with JWT solution by systemjs

Programming Languages

C#
18002 projects
typescript
32286 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to ASPNETcoreAngularJWT

AspNetCore.Weixin
An ASP.NET Core middleware for Wechat/Weixin message handling and apis. (微信公众平台/接口调用服务)
Stars: ✭ 24 (-50%)
Mutual labels:  middleware, token
Asp.net Core Graphql Middleware
ASP.Net Core GraphQL Middleware
Stars: ✭ 38 (-20.83%)
Mutual labels:  middleware, asp
Stuntman
Library for impersonating users during development leveraging ASP.NET Identity.
Stars: ✭ 285 (+493.75%)
Mutual labels:  middleware, asp
Sio.core
✔ [ SIOC ] Swastika I/O Core is an all in one platform (e.g CMS, eCommerce, Forum, Q&A, CRM...) ASP.NET Core / Dotnet Core System based on SIOH Framework.
Stars: ✭ 121 (+152.08%)
Mutual labels:  dotnetcore, asp
auth-ajax
Auth token handling for Polymer
Stars: ✭ 15 (-68.75%)
Mutual labels:  bearer, bearer-tokens
Signalw
Even simpler and faster real-time web for ASP.NET Core.
Stars: ✭ 125 (+160.42%)
Mutual labels:  dotnetcore, asp
Ocelot
.NET core API Gateway
Stars: ✭ 6,675 (+13806.25%)
Mutual labels:  middleware, dotnetcore
EasyTokenGenerator
This repo aims to dynamically and simply generate tokens in Token Based systems.
Stars: ✭ 15 (-68.75%)
Mutual labels:  dotnetcore, token
honeycomb
本项目用于验证一系列开源项目
Stars: ✭ 13 (-72.92%)
Mutual labels:  dotnetcore, serilog
Stock.Charts
This is a demo for use of the Skender.Stock.Indicators NuGet package. It is an Angular website with a .NET Web API for backend generation of indicators.
Stars: ✭ 42 (-12.5%)
Mutual labels:  dotnetcore, angular-material
Mix.core
🚀 Mixcore CMS is an open source CMS that support both headless and decoupled to easily build any kinds of app/web app/customisable APIs built on top of ASP.NET Core / Dotnet Core. It is a completely open source ASP.NET Core (Dotnet Core) CMS solution. https://mixcore.org
Stars: ✭ 304 (+533.33%)
Mutual labels:  dotnetcore, asp
aspnet-core-3-basic-authentication-api
ASP.NET Core 3.1 - Basic HTTP Authentication API
Stars: ✭ 70 (+45.83%)
Mutual labels:  dotnetcore, dotnetcore3
Live.asp.net
Code for live.asp.net, which hosts the ASP.NET Community Stand-up
Stars: ✭ 295 (+514.58%)
Mutual labels:  dotnetcore, asp
horse-jwt
Middleware for JWT in HORSE
Stars: ✭ 39 (-18.75%)
Mutual labels:  middleware, token
depremkontrol
Simple demonstration of .NET Core 3.0 - BackgroundService to create long-running IHostedService applications
Stars: ✭ 13 (-72.92%)
Mutual labels:  dotnetcore, dotnetcore3
Meiam.system
.NET 5 / .NET Core 3.1 WebAPI + Vue 2.0 + RBAC 企业级前后端分离权限框架
Stars: ✭ 340 (+608.33%)
Mutual labels:  middleware, token
Kodkod
https://github.com/alirizaadiyahsi/Nucleus Web API layered architecture startup template with ASP.NET Core 2.1, EF Core 2.1 and Vue Client
Stars: ✭ 45 (-6.25%)
Mutual labels:  serilog, bearer-tokens
Imagesharp.web
🌐 High Performance Image Processing Middleware for ASP.NET- Core.
Stars: ✭ 250 (+420.83%)
Mutual labels:  middleware, asp
swan-aspnetcore
SWAN ASP.NET Core
Stars: ✭ 28 (-41.67%)
Mutual labels:  dotnetcore, bearer-tokens
aspnet-core-3-role-based-authorization-api
ASP.NET Core 3.1 - Role Based Authorization API
Stars: ✭ 110 (+129.17%)
Mutual labels:  dotnetcore, dotnetcore3

ASPNETcoreAngularJWT

Here is very basic show case for jwt bearer token authorization, using angular as front end and ASP.NET Core as backend. ASP.NET Core3.1 angular7.2.1 with systemjs. (Make sure you have dotnet core 3.1 + and Angular7.2.1 installed)


(Why systemjs not webpack? Personal opinion: webpack just too complicated to use for any small size, simple application, I rather scarified efficient to let most programmers can read my example code)


Now you can stop google and find out how to do bear JWT token Authentication, it is simple!

At backend: MS$ provide middleware AddAuthentication().AddJwtBearer() for bear JWT token Authentication, so, things turns to be as simple as add the middleware at Startup.cs

At frontend(angular in this case): save the token in sessionStorage, and when talking to backend, set header of http(https for production) request as:

 let headers = new HttpHeaders()
                    .set('Content-Type','application/json')
                    .set("Authorization", "Bearer " + token);

Angular & material 7.2.1 in ASP.NET Core 3.1 (VS2019 or csproj version)with JWT solution.

Make sure:

ASP.NET CORE 3.1 has been installed, if not, get from here: https://www.microsoft.com/net/download/core

nodejs has been installed, if not, get from https://nodejs.org/en/download/

after download this repositiry, go to folder with file ASPNETCoreAngularJWT.csproj and run command:

>dotnet restore

>npm install

>npm start

Finally start dotnet and browser http://localhost:5000 by

>dotnet run

And do not forget to run "npm start" after modify any typescript files.

You can run this for angular compile and dotnet run

>npm run runall

Also it can be opened by both Visual Studio 2017 or Visual Studio Code. After open by VS2017 and before run as debug, make sure project-> property -> Debug and App URL ="http://localhost:5000" and rebuild again before start to debug

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].