Skip to content

Conversation

tbrugz
Copy link
Contributor

@tbrugz tbrugz commented Oct 14, 2025

Fixes #2308

Copy link
Contributor

@lprimak lprimak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some code suggestions added (to pass the build)
Rest LGTM.

LdapContext ctx = null;
try {
ctx = ldapContextFactory.getLdapContext(upToken.getUsername(), String.valueOf(upToken.getPassword()));
ctx = ldapContextFactory.getLdapContext(getUsernameWithSuffix(upToken.getUsername()), String.valueOf(upToken.getPassword()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ctx = ldapContextFactory.getLdapContext(getUsernameWithSuffix(upToken.getUsername()), String.valueOf(upToken.getPassword()));
ctx = ldapContextFactory.getLdapContext(getUsernameWithSuffix(upToken.getUsername()),
String.valueOf(upToken.getPassword()));

protected String getUsernameWithSuffix(String username) {
if (principalSuffix != null
&& !username.toLowerCase(Locale.ROOT).endsWith(principalSuffix.toLowerCase(Locale.ROOT))) {
return username += principalSuffix;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return username += principalSuffix;
return username + principalSuffix;

@lprimak
Copy link
Contributor

lprimak commented Oct 15, 2025

Thank you Telmo for your contribution.
Before we can merge it, can you do a couple of things?

  • Can you fix the code (or accept suggestions) to make it pass the build?
  • Can you make the branch in your fork something other than "main"
  • Can you squash the commits (so it's only one commit)

@lprimak lprimak added java Pull requests that update Java code CLA labels Oct 15, 2025
@lprimak lprimak added this to the 2.0.6 milestone Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Error authenticating with AD

2 participants