Forward port of https://github.com/spring-projects/spring-security/pull/11827
Comment From: marcusdacoregio
Closed via https://github.com/spring-projects/spring-security/commit/e01b43f0e4ff33a535c7cb5a5a66756be357dcfd
Forward port of https://github.com/spring-projects/spring-security/pull/11827
Comment From: marcusdacoregio
Closed via https://github.com/spring-projects/spring-security/commit/e01b43f0e4ff33a535c7cb5a5a66756be357dcfd