
Fix Spring Security 401 Unauthorized Responses in APIs
Fix a 401 Unauthorized from Spring Security by checking credentials, the Authorization header format, token validation settings and filter order.
Everything you need to level up your coding skills.

Fix a 401 Unauthorized from Spring Security by checking credentials, the Authorization header format, token validation settings and filter order.

Understand Jakarta Security: HttpAuthenticationMechanism, IdentityStore, form and OpenID Connect login, role checks with RolesAllowed and the SecurityContext.

Secure a JSF app with Jakarta Security: form authentication, an identity store, role rules in web.xml and EL, CSRF protection and session cookie settings.

Prevent server side request forgery in Java: allowlists for outbound URLs, blocking private and metadata addresses, DNS rebinding and redirect handling.

Hash passwords in Java with Argon2id, bcrypt or PBKDF2 using Spring Security's PasswordEncoder, salts, work factors, upgrades and what never to use.
We send one email when a new post is published. No spam.