Publish CsrfTokenRepository as shared object

Closes gh-9595
This commit is contained in:
Josh Cummings 2021-03-25 10:44:01 -06:00
parent e807fae869
commit d19ff12813
No known key found for this signature in database
GPG Key ID: 49EF60DD7FF83443

View File

@ -201,6 +201,7 @@ public final class CsrfConfigurer<H extends HttpSecurityBuilder<H>>
@SuppressWarnings("unchecked")
@Override
public void configure(H http) {
http.setSharedObject(CsrfTokenRepository.class, this.csrfTokenRepository);
CsrfFilter filter = new CsrfFilter(this.csrfTokenRepository);
RequestMatcher requireCsrfProtectionMatcher = getRequireCsrfProtectionMatcher();
if (requireCsrfProtectionMatcher != null) {