优化双重验证

This commit is contained in:
zhouhao
2018-12-19 12:09:16 +08:00
parent db56fe3fb4
commit 51bb17d7dc
2 changed files with 2 additions and 1 deletions

View File

@@ -110,6 +110,7 @@ public class AuthorizationController {
eventPublisher.publishEvent(beforeEvent);
// 验证通过
Authentication authentication = authenticationManager.authenticate(new PlainTextUsernamePasswordAuthenticationRequest(username, password));
//触发授权成功事件
AuthorizationSuccessEvent event = new AuthorizationSuccessEvent(authentication, parameterGetter);
event.getResult().put("userId", authentication.getUser().getId());