mirror of
https://github.com/hs-web/hsweb-framework.git
synced 2026-06-01 18:35:37 +08:00
refactor: 增加NoStackTrace异常,特定情况不记录线程栈.
This commit is contained in:
@@ -131,12 +131,12 @@ public class AuthorizationController {
|
||||
} else {
|
||||
authenticationMono = ReactiveAuthenticationHolder
|
||||
.get(event.getUserId())
|
||||
.switchIfEmpty(Mono.error(() -> new AuthenticationException(AuthenticationException.USER_DISABLED)));
|
||||
.switchIfEmpty(Mono.error(() -> new AuthenticationException.NoStackTrace(AuthenticationException.USER_DISABLED)));
|
||||
}
|
||||
} else {
|
||||
authenticationMono = authenticationManager
|
||||
.authenticate(Mono.just(new PlainTextUsernamePasswordAuthenticationRequest(event.getUsername(), event.getPassword())))
|
||||
.switchIfEmpty(Mono.error(() -> new AuthenticationException(AuthenticationException.ILLEGAL_PASSWORD)));
|
||||
.switchIfEmpty(Mono.error(() -> new AuthenticationException.NoStackTrace(AuthenticationException.ILLEGAL_PASSWORD)));
|
||||
}
|
||||
return authenticationMono;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user