Authentication Mechanisms: Cookies, Sessions, Tokens, JWT, and Single Sign-On
The Statelessness Problem
HTTP is inherently stateless—each request is independent with no knowledge of previous interactions. However, real-world applications require maintaining user state across multiple requests. Imagine a user logging into a social platform: they expect their feed, comments, and follows to all occur within their authentica ...
Posted on Mon, 07 Sep 2026 16:54:02 +0000 by consultant1027
JWT Token Authentication and Refresh Mechanism
JWT Token Generation
A JWT token consists of three parts: the Header (algorithm and token type), the Payload (business data like expiration and username), and the Signature (encrypts the header and payload using a secret key and algorithm). Typically, Jwts.builder() handles the header automatically.
Create a JwtUtils utility class under the ut ...
Posted on Sat, 15 Aug 2026 16:28:21 +0000 by T2theC
Integrating Spring Security for Token-Based Authentication and Authorization
1. Introduction to Spring Security
1.1 Framework Overview
Spring is a highly popular and successful Java application development framework. Spring Security, built upon the Spring framework, provides a comprehensive solution for web application security. Generally, web application security includes two parts: user authentication and user authori ...
Posted on Fri, 24 Jul 2026 16:28:33 +0000 by bobbyM
JWT Security: A WebGoat Challenge Walkthrough
Cookie (Stored in Browser)
A cookie is a specific piece of data that is permanently stored in the browser. It is merely a data storage functionality implemented by browsers. Cookies are generated by the server, sent to the browser, and saved as key-value pairs in a text file within a directory on the client. On subsequent requests to the same w ...
Posted on Thu, 07 May 2026 05:24:52 +0000 by marcela1637