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

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

1 participant

@spring-issuemaster

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

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

@spring-issuemaster

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.

@spring-issuemaster

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.

@spring-issuemaster

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.

@spring-issuemaster

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