Skip to main content

One post tagged with "node"

View All Tags

· 5 min read
Pavan Kumar

You might have heard about JWT if you are in field of developing applications or not from other domains. JSON Web Token (JWT) is a standard for representing claims securely between two parties. It is typically used to securely transmit information between a server and a client, such as an API and a single-page application. JWTs are a useful tool for securely transmitting information between parties, and are commonly used in modern web applications for authentication and authorization

A JWT consists of three parts: a header, a payload, and a signature. The header typically consists of two parts: the type of the token, which is JWT, and the signing algorithm being used, such as HMAC SHA256 or RSA. The payload contains the claims. Claims are statements about an entity (typically, the user) and additional data. There are three types of claims: registered, public, and private claims. Registered claims are a set of predefined claims that are not mandatory but recommended, to provide a set of useful, interoperable claims. Some of the registered claims are: iss (issuer), exp (expiration time), sub (subject), aud (audience), and others. Public claims are claims that are defined in the IANA JSON Web Token Registry or defined in other specifications, but are not registered. Private claims are claims that are used to share information between parties that agree on using them and are neither registered or public claims...