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