Friday, April 10, 2020

What is JWT , please explain with Examples.


What is JWT , please explain with Examples.
Answers :-
Authorize with JWT in ASP.NET Core 3.1 Web API. ASP.NET Core 3.1 provides native support that allows you to authorize endpoints using JSON web Tokens (JWT) i.e. without any dependency on third party packages. You may need additional config such as Issuer and Audience addresses if you wish to validate those
Examples
----------------------------------------------------------
Asp.net core 3.0 Web Api token based authentication example using JWT in VS 2019
----------------------------------------------------------
 In this tutorial we are going to cover web api token based authentication example using JWT in asp.net core 3.0with vs 2019
We will build it from scratch step by step
1. First we need to developer web api project , and then we will implement Microsoft Identity and then finally we will impement token based authentication using JWT in asp.net core 3.0 web API application.

Conditions
----------------------------------------------------------
We before go create WEB API token based authentication
we need to install following tools
----------------------------------------------------------
1. VS 2019
2. .NET Core 3.0
3. Postman
4. Sql Server
----------------------------------------------------------
How to implement token based authentication (JWT) in asp.net core 3.1 web api.?
----------------------------------------------------------
Lets start implement web api token based authentication example using asp.net core 3.0


Step#1
How How to create asp.net core 3.0 web api using VS2019

Step#2
How to setup Database and implement Microsoft Identity in asp.net core 3.1 Web API Project
In this steop we will setup database in aps.net core 3.1 web api project, so go to project folder structure and then open appsettings.json file and then set connection string as per the syntax see the below example

-         Now need to install Entity Framework Core Package 3.1
-         


No comments:

Post a Comment

Rewrite whole Web Site System and Sub System with data migration to new system.

Can you please share me your skype id or whats up number for better communications  my skype id is - jitendra.tech  whats up - +919617741414...