You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
This bug is related to #1931
The solution 9c03b6f depends on DefaultLoginPageGeneratingFilter presence. And so it works only if default form is used. But if the login page customized it doesn't work. To Reproduce
I'm using SpringBoot 2.7.5 and Spring Security 5.7.4. Other project dependencies:
@RestController
@RequestMapping("foos")
public class FooController {
@GetMapping(value = "/{id}")
public Foo findById(@PathVariable("id") final Long id) {
return new Foo(randomAlphabetic(6));
}
@GetMapping
public List<Foo> findAll() {
return Lists.newArrayList(new Foo(randomAlphabetic(6)));
}
@PostMapping
@ResponseStatus(HttpStatus.CREATED)
public Foo create(@RequestBody final Foo foo) {
return foo;
}
}
Expected behavior
I would have expected that form-login authentication configuration would be detected and the exposed Spring Security's detected login endpoint to be exposed with the option for x-www-form-urlencoded body type to be available.
The text was updated successfully, but these errors were encountered:
isaladkou
changed the title
Spring Security form login only offers application/json req body type whem login page customized
Spring Security form login only offers application/json req body type when login page customized
Jul 11, 2023
Describe the bug
This bug is related to #1931
The solution 9c03b6f depends on DefaultLoginPageGeneratingFilter presence. And so it works only if default form is used. But if the login page customized it doesn't work.
To Reproduce
I'm using SpringBoot 2.7.5 and Spring Security 5.7.4. Other project dependencies:
Supplying property: springdoc.show-login-endpoint=true
Spring security simple config:
A simple controller:
Expected behavior
I would have expected that form-login authentication configuration would be detected and the exposed Spring Security's detected login endpoint to be exposed with the option for x-www-form-urlencoded body type to be available.
Screenshots
https://drive.google.com/file/d/1LYJ9zkE0m4emA96AmITds1KxT90I6rxj/view?usp=drive_link
Additional context
I have also created this repo with the sample code: https://github.com/isaladkou/springdoc-form-login
The text was updated successfully, but these errors were encountered: