Commit 8a6d2455 authored by Jie Yuan's avatar Jie Yuan
Browse files

change return entity of /api/auth/api-token

parent 378e977b
......@@ -154,6 +154,7 @@ public class AuthController {
newtoken.setToken(jwt);
newtoken.setValidationDate(calendarToExpireDate());
tokenRepo.save(newtoken);
return ResponseEntity.ok(newtoken);
} else {
Claims claims = Jwts.parser()
......@@ -167,10 +168,11 @@ public class AuthController {
atoken.setValidationDate(calendarToExpireDate());
tokenRepo.saveAndFlush(atoken);
userRepository.flush();
return ResponseEntity.ok(atoken);
}
return ResponseEntity.ok(new JwtAuthenticationResponse(jwt));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment