spring-security/docs/modules/ROOT/pages/servlet
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
..
appendix Fix typo 2025-03-20 14:38:09 -05:00
authentication Advise Overriding equals() and hashCode() in UserDetails Implementations 2025-05-21 12:41:44 -06:00
authorization Update authorize-http-requests.adoc 2025-03-21 14:46:53 -06:00
configuration Clarify Package Import 2024-04-30 08:48:57 -03:00
exploits Polish Dark Mode for CSRF and Method Security diagrams 2024-11-26 01:53:56 +05:30
integrations Merge branch '5.8.x' into 6.2.x 2024-12-09 15:25:50 -07:00
oauth2 Use proper configuration key 2025-04-29 13:37:51 -06:00
saml2 Add Missing Header 2025-05-15 18:16:36 -06:00
test Fix Spring Framework reference link 2025-03-20 14:38:08 -05:00
architecture.adoc Merge branch '5.8.x' into 6.2.x 2024-11-18 12:12:46 -07:00
getting-started.adoc Fix Role Name Typo 2024-04-26 15:37:51 -06:00
index.adoc Docs Use Section Summary where appropriate 2021-10-28 14:02:38 -05:00