Posts
All the articles I've posted.
A DNS Issue in a Development Environment
During API acceptance testing, the development environment kept returning 502 errors even though the deployment team found no problem with the environment. The browser console showed that the domain resolved to the wrong IP address, so I changed my local DNS server settings.
Where to Put Filter Conditions in MySQL Joins
A two-table LEFT JOIN example compares the results of putting filter conditions in ON versus WHERE. It shows how a condition on the right-hand table in WHERE removes some left-hand records, and how moving the condition changes the join results to match the intended output.
Spring Boot: Pitfalls with @Async and @Transactional
Using asynchronous conversion of uploaded Word documents to images as an example, this article investigates why @Async did not take effect in Spring Boot. It explains the importance of return types and calls through a proxy, and discusses similar considerations for @Transactional when methods call other methods in the same class.
Using Shiro: Complete Spring Boot Integration Code
The main code for integrating Shiro, Spring Boot, and JWT: the Shiro configuration, a custom Realm, an authentication filter, and a JWT utility. Together, these four pieces show login authentication, request interception, and token creation and validation, with a look back at the session-management choices made during integration.
Using Shiro: Integrating JWT for More Capable Tokens
JWT is integrated with Shiro and Spring Boot to issue tokens after login and parse, validate, and check them for expiry on subsequent requests. This article explains the JWT utility, authentication filter, and configuration properties, and traces a dependency-injection failure caused by constructing the filter manually.
Using Shiro with Tokens
A custom Shiro filter validates tokens on incoming requests. The article covers returning a token after login, adding the filter to the authentication chain, and tracing filter execution order in the source code, then discusses token expiry and distributed authentication that the example has not yet implemented.
Using Shiro: A Primer on Tokens and Why to Use Them
Starting from login validation in traditional web applications, this article discusses the differences between sessions and tokens in storage, sharing across distributed systems, and request authentication. It compares validation approaches using a database, Redis, or no token storage to clarify design considerations for implementing token authentication with Shiro.
Using Shiro: Password Hashing and Salting, with Authentication Troubleshooting
This article walks through password hashing, salted storage, and login verification in Shiro and uses its source code to explain credential comparison. It also covers troubleshooting passwords still stored as plaintext and authentication failures after salting, including the roles of the algorithm, salt, and hash iteration count.