Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

SEC-1480: LdapUserDetailsImpl does not override equals/hashCode #1716

spring-issuemaster opened this Issue May 14, 2010 · 4 comments


None yet
1 participant

Angel D. Segarra (Migrated from SEC-1480) said:

result is that namespace session management config does not work with default LdapUserDetailsImpl.

Luke Taylor said:

Please explain what you mean by "namespace session management config does not work" and supply a test case which reproduces the problem.

Angel D. Segarra said:

sorry. I mean using the tag in the namespace element. I was trying to use but it did not work. I was using the ldap provider with a custom principal that extended LdapUserDetailsImpl. After following some advice about the session registry keying on the principal, I looked at the source and it did not implement equals/hashCode. So I implemented these on my custom principal and it worked.

Luke Taylor said:

Ok, I think I see where you're coming from now. The LdapUserDetailsImpl may be used as the principal object in the session registry, which requires a hash lookup. I've added equals and hashcode, purely based on the DN value (and ignoring other data) since that should uniquely identify the principal. That should do the trick for this use case.

Angel D. Segarra said:

Great. thanks.

@spring-issuemaster spring-issuemaster added this to the 3.1.0.M1 milestone Feb 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment