wolfboys commented on code in PR #3237:
URL:
https://github.com/apache/incubator-streampark/pull/3237#discussion_r1357709964
##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/security/impl/LdapService.java:
##########
@@ -104,18 +104,18 @@ public String ldapLogin(String userId, String userPwd) {
new InitialDirContext(ldapEnv);
} catch (Exception e) {
log.warn("invalid ldap credentials or ldap search error", e);
- return null;
+ return false;
}
Attribute attr = attrs.next();
- if (attr.getID().equals(ldapEmailAttribute)) {
- return (String) attr.get();
+ if (attr.getID().equals(ldapUserIdentifyingAttribute)) {
Review Comment:
the code can be optimized `return
attr.getID().equals(ldapUserIdentifyingAttribute)`
--
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]