Authentication Articles
5 articles about Authentication. Explore Spring Boot implementation, design, and operations across related topics.
-
Which Spring Boot Authentication Method Should You Choose? Comparing Session, JWT, OAuth2, and API Key with a Selection Flowchart
Compare Spring Boot authentication methods (Session, JWT, OAuth2, API Key) by application architecture. Use the selection flowchart and comparison table to decide which method fits your app, then move from a minimal SecurityFilterChain configuration to each implementation guide.
-
Implementing Database Authentication with Spring Security - Persisting Users with UserDetailsService and JdbcUserDetailsManager
This article explains the standard pattern for moving away from in-memory users and authenticating against users stored in your own users table. It covers, with code, how to write your own UserDetailsService, wire it into DaoAuthenticationProvider, use JdbcUserDetailsManager with the standard schema, register and verify passwords with BCrypt, and handle account disabling.
-
How to Implement JWT Refresh Tokens with Spring Security
A guide to issuing, rotating, and revoking access tokens and refresh tokens in Spring Boot, including Redis persistence and reuse detection.
-
Spring Boot JWT Authentication with Spring Security (Tutorial)
Build JWT authentication for a Spring Boot REST API from scratch. Covers token generation, validation, JwtAuthenticationFilter, and SecurityFilterChain configuration with complete code examples.
-
Getting Started with Authentication in Spring Boot Using Spring Security - From Basic Auth to Form Login
A beginner-friendly tutorial for implementing authentication step by step with Spring Security in Spring Boot. Covers SecurityFilterChain fundamentals, the BCrypt password encoder, Basic authentication (verified with curl), form login, logout, and custom login pages, with careful explanations of the configuration points where beginners commonly get stuck.