Remove formLogin settings for JWT
This commit is contained in:
@@ -44,7 +44,7 @@ public class AuthController {
|
|||||||
return "user/signIn";
|
return "user/signIn";
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping
|
@PostMapping("/signIn")
|
||||||
public ResponseEntity<TokenDto> signIn(@Validated UserSignInRequest signInReq) {
|
public ResponseEntity<TokenDto> signIn(@Validated UserSignInRequest signInReq) {
|
||||||
return authService.signIn(signInReq);
|
return authService.signIn(signInReq);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,12 +42,12 @@ public class SecurityConfig {
|
|||||||
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
|
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
|
||||||
//
|
//
|
||||||
http
|
http
|
||||||
.csrf().disable()
|
.csrf().disable();
|
||||||
.formLogin()
|
// .formLogin()
|
||||||
.loginPage("/auth/signIn")
|
// .loginPage("/auth/signIn")
|
||||||
.usernameParameter("email")
|
// .usernameParameter("email")
|
||||||
.defaultSuccessUrl("/")
|
// .defaultSuccessUrl("/")
|
||||||
.failureUrl("/auth/signIn?fail=true");
|
// .failureUrl("/auth/signIn?fail=true");
|
||||||
|
|
||||||
//
|
//
|
||||||
http
|
http
|
||||||
|
|||||||
Reference in New Issue
Block a user