Skip to main content

15 docs tagged with "spring-security"

View all tags

Authentication — Practical Demo

Hands-on code examples for Spring Security authentication — UserDetailsService, BCrypt, custom login endpoint, and accessing the current user.

Authorization — Practical Demo

Hands-on examples for Spring Security authorization — URL rules, @PreAuthorize, SpEL expressions, ownership checks, and testing access control.

CSRF and CORS — Practical Demo

Hands-on examples for CSRF protection and CORS configuration in Spring Boot — Cookie-based CSRF for SPAs, production CORS setup, fixing the preflight 401 problem, and testing with MockMvc.

CSRF and CORS in Spring Security

How Spring Security prevents Cross-Site Request Forgery attacks with CSRF tokens, when to disable CSRF for REST APIs, and how to configure CORS for Single-Page Applications talking to Spring Boot backends.

JWT Authentication — Practical Demo

Hands-on examples for JWT authentication in Spring Boot — generating tokens, validating with Spring Security's resource server, custom claims, and refresh token pattern.

JWT Authentication in Spring Security

JSON Web Token structure, signing (symmetric vs. asymmetric), validation, and how to wire stateless JWT authentication into a Spring Boot REST API using Spring Security's OAuth2 Resource Server support.

OAuth2 and OIDC — Practical Demo

Hands-on examples for OAuth2 and OpenID Connect in Spring Boot — social login, resource server with external auth server, client credentials for microservices, and accessing OIDC user info.

OAuth2 and OpenID Connect in Spring Security

OAuth2 authorization flows, the resource server and authorization server patterns, OpenID Connect identity layer, and how to configure Spring Boot as an OAuth2 client and resource server.

Spring Security

Authentication, authorization, OAuth2, JWT, filter chains, CSRF, and CORS for Spring Boot applications.

Spring Security Authentication

How Spring Security authenticates users — UserDetailsService, PasswordEncoder, AuthenticationManager, and the authentication flow from credentials to SecurityContext.

Spring Security Authorization

How Spring Security enforces access control — URL-based rules with requestMatchers, method-level security with @PreAuthorize and @Secured, and the role vs. authority distinction.

Spring Security Filter Chain

How Spring Security's ordered chain of servlet filters intercepts every HTTP request and applies authentication and authorization before the request reaches your controller.

Spring Security Interview Questions

Consolidated interview Q&A for Spring Security covering filter chain, authentication, authorization, JWT, OAuth2, CSRF, and CORS — beginner through advanced.

Spring Security Overview

Quick-reference summary of Spring Security's filter chain, authentication, authorization, JWT, OAuth2, CSRF, and CORS — key concepts, annotations, and interview questions at a glance.