Fixed login request validation
This commit is contained in:
parent
5a5cc2e013
commit
d209586933
1 changed files with 2 additions and 1 deletions
|
@ -43,7 +43,8 @@ public class AuthenticationController {
|
|||
}
|
||||
|
||||
@PostMapping("/login")
|
||||
public JWTResponse login(@RequestBody JWTRequest authenticationRequest) throws Exception {
|
||||
public JWTResponse login(@Valid @RequestBody JWTRequest authenticationRequest)
|
||||
throws Exception {
|
||||
if (authenticationRequest.getUsernameOrEmail().contains("@")) {
|
||||
// usernameOrEmail contains an email, so fetch the corresponding username
|
||||
final User user =
|
||||
|
|
Loading…
Reference in a new issue