Posts

Showing posts from January, 2020

Authenticating Angular 8 Client Application with JSON WEB Token (JWT) Based Authentication

Image
In my  previous article we have seen the Token based authentication using ASP.NET Core 3.1. In continuation of that post, in this post we will demonstrate the Authentication of the Angular application. Angular is one of the most preferred framework for modern front-end applications. Angular uses the http module from @angular/common package to make HTTP Calls to external REST APIs.  Angular uses HttpInterceptor interface. This interface intercepts and handles Httprequest and HttpResponse. The interceptor transforms the outgoing request by adding addition information into the HTTP headers e.g. Token information. To authenticate the client application using JSON Web Token we need to register new users using the authentication service and then authenticate the user to receive JSON Web Token from the server side application. The client application uses this token to make requests to the server and  the server authenticate the requests from the client application based on ...

Understanding Token Based Authentication in ASP.NET Core 3.1 using JSON WEB TOKENS

Image
In this post we will discuss the Token Based Authentication in ASP.NET Core 3.1.  Security is one of the backbone for modern web application development. In most of the Modern Web Applications the security is implemented using JSON Web Tokens.  What is JSON Web Token? JSON Web Token (JWT), is an open standard, self-defined and compact mechanism for securely transmitting information across parties using JSON object. Since the token carries digital signature, the information in transmission is verified and trusted. The signature can be generated using HMAC algorithm or using public/private key pairs using RSA. The Signed token can be used to verify integrity of claims contained within it. The claim are the entities contained in the token e.g. user, roles, etc. When can we use JSON Web Tokens? We can use JSON Web Tokens in case of following scenarios Authorization:   This is the frequent scenario of using JWT in modern applications. When the user log...