In this video, I will walk through how to Authenticate a gRPC service. And I am going to use JWT Token as the authentication mechanism. For understanding the video, I would request you to go through the following blogs and YouTube videos to set up the context.
For JWT Authentication:
Blog: https://dotnetcorecentral.com/blog/au...
Video: • ASP.NET Core Authentication with JWT ...
For gRPC Services:
Blog: https://dotnetcorecentral.com/blog/gr...
Video: • gRPC in ASP.Net Core 3.0 (Unary remot...
gRPC is an open-source, high-performance RPC framework. In this blog, I am going to cover gRPC in ASP.Net Core. We can use gRPC within or across data centers. We can use gRPC in mobile applications, web applications as well as edge computing as a backend service.
Google was the first to develop gRPC, later it open-sourced it. gRPC uses HTTP 2 for the transport protocol. It uses protobuf (or protocol buffer) for defining interfaces. gRPC is a contract first framework, allowing us to build contract first based distributed systems.
When it comes to the analogy, gRPC is more close to Remoting than compared to REST Services. In gRPC client can make a server method call, as if the method is in the local object. This makes it really easy to create distributed systems. Whereas REST services are based on resource access.
We can build gRPC clients and servers in completely different programming languages. Meaning, the server can be in C#, whereas the client can be in Python.
By default gRPC uses protobuf for serializing data, however, it can be using JSON format as well.
gRPC was introduced in .Net Core with the release of .Net Core 3.0. Hence you will need .Net Core 3.0 installed for gRPC to work.