1 | package edu.ucsb.cs156.organic.controllers; | |
2 | ||
3 | import org.springframework.context.annotation.Profile; | |
4 | import org.springframework.security.web.csrf.CsrfToken; | |
5 | import org.springframework.web.bind.annotation.GetMapping; | |
6 | import org.springframework.web.bind.annotation.RestController; | |
7 | ||
8 | import io.swagger.v3.oas.annotations.tags.Tag; | |
9 | import io.swagger.v3.oas.annotations.Operation; | |
10 | ||
11 | @Profile("development") | |
12 | @Tag(name = "CSRF (enabled only in development; can be used with Postman to test APIs)") | |
13 | @RestController | |
14 | public class CSRFController { | |
15 | @Operation(summary = "Get a CSRF Token") | |
16 | @GetMapping("/csrf") | |
17 | public CsrfToken csrf(CsrfToken token) { | |
18 |
1
1. csrf : replaced return value with null for edu/ucsb/cs156/organic/controllers/CSRFController::csrf → KILLED |
return token; |
19 | } | |
20 | } | |
Mutations | ||
18 |
1.1 |