|
@@ -29,7 +29,6 @@ import org.springframework.security.authentication.AuthenticationManager;
|
|
|
import org.springframework.security.authentication.AuthenticationProvider;
|
|
|
import org.springframework.security.config.Customizer;
|
|
|
import org.springframework.security.config.annotation.web.HttpSecurityBuilder;
|
|
|
-import org.springframework.security.config.annotation.web.RequestMatcherFactory;
|
|
|
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
|
|
import org.springframework.security.config.annotation.web.configurers.AbstractAuthenticationFilterConfigurer;
|
|
|
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
|
|
@@ -237,7 +236,7 @@ public final class Saml2LoginConfigurer<B extends HttpSecurityBuilder<B>>
|
|
|
this.authenticationRequestParams = new String[parts.length - 1];
|
|
|
System.arraycopy(parts, 1, this.authenticationRequestParams, 0, parts.length - 1);
|
|
|
this.authenticationRequestMatcher = new PathQueryRequestMatcher(
|
|
|
- RequestMatcherFactory.matcher(this.authenticationRequestUri), this.authenticationRequestParams);
|
|
|
+ getRequestMatcherBuilder().matcher(this.authenticationRequestUri), this.authenticationRequestParams);
|
|
|
return this;
|
|
|
}
|
|
|
|
|
@@ -254,13 +253,13 @@ public final class Saml2LoginConfigurer<B extends HttpSecurityBuilder<B>>
|
|
|
@Override
|
|
|
public Saml2LoginConfigurer<B> loginProcessingUrl(String loginProcessingUrl) {
|
|
|
Assert.hasText(loginProcessingUrl, "loginProcessingUrl cannot be empty");
|
|
|
- this.loginProcessingUrl = RequestMatcherFactory.matcher(loginProcessingUrl);
|
|
|
+ this.loginProcessingUrl = getRequestMatcherBuilder().matcher(loginProcessingUrl);
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
protected RequestMatcher createLoginProcessingUrlMatcher(String loginProcessingUrl) {
|
|
|
- return RequestMatcherFactory.matcher(loginProcessingUrl);
|
|
|
+ return getRequestMatcherBuilder().matcher(loginProcessingUrl);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -338,8 +337,8 @@ public final class Saml2LoginConfigurer<B extends HttpSecurityBuilder<B>>
|
|
|
}
|
|
|
|
|
|
private AuthenticationEntryPoint getLoginEntryPoint(B http, String providerLoginPage) {
|
|
|
- RequestMatcher loginPageMatcher = RequestMatcherFactory.matcher(this.getLoginPage());
|
|
|
- RequestMatcher faviconMatcher = RequestMatcherFactory.matcher("/favicon.ico");
|
|
|
+ RequestMatcher loginPageMatcher = getRequestMatcherBuilder().matcher(this.getLoginPage());
|
|
|
+ RequestMatcher faviconMatcher = getRequestMatcherBuilder().matcher("/favicon.ico");
|
|
|
RequestMatcher defaultEntryPointMatcher = this.getAuthenticationEntryPointMatcher(http);
|
|
|
RequestMatcher defaultLoginPageMatcher = new AndRequestMatcher(
|
|
|
new OrRequestMatcher(loginPageMatcher, faviconMatcher), defaultEntryPointMatcher);
|
|
@@ -393,9 +392,9 @@ public final class Saml2LoginConfigurer<B extends HttpSecurityBuilder<B>>
|
|
|
private RequestMatcher getAuthenticationRequestMatcher() {
|
|
|
if (this.authenticationRequestMatcher == null) {
|
|
|
this.authenticationRequestMatcher = RequestMatchers.anyOf(
|
|
|
- RequestMatcherFactory
|
|
|
+ getRequestMatcherBuilder()
|
|
|
.matcher(Saml2AuthenticationRequestResolver.DEFAULT_AUTHENTICATION_REQUEST_URI),
|
|
|
- new PathQueryRequestMatcher(RequestMatcherFactory.matcher(this.authenticationRequestUri),
|
|
|
+ new PathQueryRequestMatcher(getRequestMatcherBuilder().matcher(this.authenticationRequestUri),
|
|
|
this.authenticationRequestParams));
|
|
|
}
|
|
|
return this.authenticationRequestMatcher;
|
|
@@ -404,8 +403,8 @@ public final class Saml2LoginConfigurer<B extends HttpSecurityBuilder<B>>
|
|
|
private RequestMatcher getLoginProcessingEndpoint() {
|
|
|
if (this.loginProcessingUrl == null) {
|
|
|
this.loginProcessingUrl = RequestMatchers.anyOf(
|
|
|
- RequestMatcherFactory.matcher(Saml2WebSsoAuthenticationFilter.DEFAULT_FILTER_PROCESSES_URI),
|
|
|
- RequestMatcherFactory.matcher("/login/saml2/sso"));
|
|
|
+ getRequestMatcherBuilder().matcher(Saml2WebSsoAuthenticationFilter.DEFAULT_FILTER_PROCESSES_URI),
|
|
|
+ getRequestMatcherBuilder().matcher("/login/saml2/sso"));
|
|
|
}
|
|
|
|
|
|
return this.loginProcessingUrl;
|