mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-31 17:22:13 +00:00
Publish CsrfTokenRepository as shared object
Closes gh-9595
This commit is contained in:
parent
e807fae869
commit
d19ff12813
@ -201,6 +201,7 @@ public final class CsrfConfigurer<H extends HttpSecurityBuilder<H>>
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public void configure(H http) {
|
public void configure(H http) {
|
||||||
|
http.setSharedObject(CsrfTokenRepository.class, this.csrfTokenRepository);
|
||||||
CsrfFilter filter = new CsrfFilter(this.csrfTokenRepository);
|
CsrfFilter filter = new CsrfFilter(this.csrfTokenRepository);
|
||||||
RequestMatcher requireCsrfProtectionMatcher = getRequireCsrfProtectionMatcher();
|
RequestMatcher requireCsrfProtectionMatcher = getRequireCsrfProtectionMatcher();
|
||||||
if (requireCsrfProtectionMatcher != null) {
|
if (requireCsrfProtectionMatcher != null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user