鉴权
This commit is contained in:
@@ -45,7 +45,7 @@ public class SecurityConfig {
|
||||
.addFilterBefore(jwtAuthFilter, UsernamePasswordAuthenticationFilter.class)
|
||||
.authenticationProvider(provider)
|
||||
.authorizeHttpRequests(auth -> auth
|
||||
.requestMatchers("/login", "/captcha").permitAll()
|
||||
.requestMatchers("/auth/login", "/auth/captcha").permitAll()
|
||||
.anyRequest().authenticated());
|
||||
|
||||
return http.build();
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/auth")
|
||||
@RequestMapping("/auth")
|
||||
public class AuthController {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(AuthController.class);
|
||||
|
||||
Reference in New Issue
Block a user