spring-security/docs/modules/ROOT/pages/servlet/authentication
Gurunathan a4cd6f4278
Advise Overriding equals() and hashCode() in UserDetails Implementations
This commit adds a documentation note explaining the importance of
overriding equals() and hashCode() in custom UserDetails implementations.

The default SessionRegistryImpl in Spring Security uses an in-memory
ConcurrentMap<Object, Set<String>>, Map<String,SessionInformation> to
associate principals with sessions. If a custom UserDetails class does
not properly override equals() and hashCode(), user sessions may not
be tracked or matched correctly.

I believe this helps developers avoid subtle session management issues
when implementing custom authentication logic.

Signed-off-by: Gurunathan <129361658+Gurunathan16@users.noreply.github.com>
2025-05-21 12:41:44 -06:00
..
passwords Merge branch '6.2.x' into 6.3.x 2024-11-18 12:13:05 -07:00
anonymous.adoc Typo: Update anonymous.adoc 2024-02-05 11:34:38 -07:00
architecture.adoc Merge branch '5.8.x' into 6.2.x 2024-11-18 12:12:46 -07:00
cas.adoc Revert unnecessary merges on 6.0.x 2023-10-31 15:11:45 -05:00
events.adoc Merge branch '5.8.x' into 6.0.x 2023-06-18 21:33:58 -05:00
index.adoc Revert unnecessary merges on 6.0.x 2023-10-31 15:11:45 -05:00
jaas.adoc Merge branch '5.8.x' into 6.0.x 2023-06-18 21:33:58 -05:00
logout.adoc Correct method name 2025-05-06 10:17:29 -05:00
persistence.adoc Merge branch '5.8.x' into 6.2.x 2024-11-18 12:12:46 -07:00
preauth.adoc Merge branch '5.8.x' into 6.0.x 2023-06-18 21:33:58 -05:00
rememberme.adoc Merge branch '5.8.x' into 6.2.x 2024-05-23 14:04:35 -03:00
runas.adoc Merge branch '5.8.x' into 6.0.x 2023-06-18 21:33:58 -05:00
session-management.adoc Advise Overriding equals() and hashCode() in UserDetails Implementations 2025-05-21 12:41:44 -06:00
x509.adoc Reformatted lines in x509 overview documentation 2025-05-01 12:02:45 -06:00