arshadmohammad commented on code in PR #269:
URL: https://github.com/apache/seatunnel-web/pull/269#discussion_r1918635448
##########
seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/service/impl/UserServiceImpl.java:
##########
@@ -139,16 +172,14 @@ public void disable(int id) {
}
@Override
- public UserSimpleInfoRes login(UserLoginReq req) {
-
- final String username = req.getUsername();
- final String password = PasswordUtils.encryptWithSalt(defaultSalt,
req.getPassword());
-
- final User user = userDaoImpl.checkPassword(username, password);
- if (Objects.isNull(user)) {
- throw new SeatunnelException(USERNAME_PASSWORD_NO_MATCHED);
+ public UserSimpleInfoRes login(UserLoginReq req, String authType) {
+ if (StringUtils.isNotEmpty(authType) &&
!strategies.containsKey(authType)) {
+ throw new SeatunnelException(
+ SeatunnelErrorEnum.INVALID_AUTHENTICATION_PROVIDER,
authType);
Review Comment:
write integration tests, at least cover the negative scenario which does not
required LDAP server to be available
you can take reference from https://github.com/apache/seatunnel-web/pull/264
PR
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]