Programming Tips 💡
51.7K subscribers
67 photos
10 videos
30 files
355 links
Programming & AI:
Tips 💡
Articles 📕
Resources 👟
Design Patterns 💎
Software Principles ✅

🇳🇱 Contact: @MoienTajik

🎯 Buy ads: https://telega.io/c/ProgrammingTip
Download Telegram
Securing ASP.NET Core 2.0 Applications with JWTs + Auth0 🔑

JSON Web Tokens, often shortened with JWTs, are gathering more and more popularity in the Web environment. 🌐

It is an open standard that allows transmitting data between parties as a JSON object in a compact and secure way. 🔁

They are usually used in authentication and information exchange scenarios, since the data transmitted between a source and a target are digitally signed so that they can be easily verified and trusted. ✅

Let's take a look at how to set up a ASP.NET Core 2 application with JWT support by creating a Web API application. ✹

https://t.iss.one/pgimg/110

[ Article ] : https://bit.do/auth0

〰〰〰〰〰〰
#AspMvc #Core #JWT
@ProgrammingTip
ASP.NET Core 2 – Global Model Validation ⚠

We use a lot of repetitive code in our actions. ♻

Inside of our controller actions we usually check if the model is valid by using ModelState property available on MVC’s base controller class :

if (!ModelState.IsValid)  
return BadRequest(ModelState);


The bad thing about is that we repeat this piece of code throughout a lot of our actions. ❌

How we can make it better❓

This article shows you how to validate ModelState with a global filter. 💎

https://t.iss.one/pgimg/112

[ Article ] : bit.do/mval

〰〰〰〰〰〰
#AspMvc #Core #Validation
@ProgrammingTip