File tree Expand file tree Collapse file tree
src/main/java/com/cognizant/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616
1717import java .util .List ;
1818
19- /**
20- * Spring Security configuration.
21- * - Stateless JWT auth (no sessions)
22- * - Public routes: /api/users/login, /api/users/register
23- * - Everything else requires a valid JWT
24- *
25- * Add to pom.xml:
26- * <dependency>
27- * <groupId>org.springframework.boot</groupId>
28- * <artifactId>spring-boot-starter-security</artifactId>
29- * </dependency>
30- */
19+
3120@ Configuration
3221@ EnableWebSecurity
3322public class SecurityConfig {
@@ -49,6 +38,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
4938 .requestMatchers ("/api/users/login" ).permitAll ()
5039 .requestMatchers ("/api/users/register" ).permitAll ()
5140 .requestMatchers ("/api/attachments/download/**" ).permitAll ()
41+ .requestMatchers (HttpMethod .POST , "/api/defects/*/attachments" ).permitAll ()
5242 .requestMatchers ("/swagger-ui/**" , "/v3/api-docs/**" ).permitAll ()
5343
5444 // Role-specific routes
You can’t perform that action at this time.
0 commit comments