Posts

Showing posts from June, 2019

Adding ASP.NET MVC5 Identity Authentication to an existing project

https://stackoverflow.com/questions/31960433/adding-asp-net-mvc5-identity-authentication-to-an-existing-project https://code.msdn.microsoft.com/ASPNET-MVC-5-Security-And-44cbdb97 https://www.c-sharpcorner.com/article/create-identity-in-simple-ways-using-asp-net-mvc-5/ https://stackoverflow.com/questions/31960433/adding-asp-net-mvc5-identity-authentication-to-an-existing-project

SECURING WEBAPI USING JSON WEB TOKEN (JWT) IN WEB API C#

Image
ref site :  http://www.decatechlabs.com/secure-webapi-using-jwt Step 1 : Step 2 : Step 3 : Step 4 : Now replace all code with below code using   Microsoft . IdentityModel . Tokens ; using   System ; using   System . Collections . Generic ; using   System . IdentityModel . Tokens ; using   System . IdentityModel . Tokens . Jwt ; using   System . IO ; using   System . Linq ; using   System . Net ; using   System . Net . Http ; using   System . Security . Cryptography . X509Certificates ; using   System . Threading ; using   System . Threading . Tasks ; using   System . Web ; namespace   WEBAPI_JWT_Authentication {      internal   class   TokenValidationHandler   :   DelegatingHandler      {          private   static   bool   TryRetrieveToken ...