Spring security Spring security 5.20+;SAML2

Spring security Spring security 5.20+;SAML2,spring-security,saml-2.0,spring-security-saml2,Spring Security,Saml 2.0,Spring Security Saml2,是否可以启动限制特定URL的SAML2身份验证过程?所以我的想法是使用像/saml2login这样的URL启动所有SAML身份验证过程 我尝试过类似的东西: httpSecurity.authorizeRequests() .antMatchers("/saml2login").authenticated() .and() .saml2Login() .relyin

是否可以启动限制特定URL的SAML2身份验证过程?所以我的想法是使用像/saml2login这样的URL启动所有SAML身份验证过程

我尝试过类似的东西:

  httpSecurity.authorizeRequests()
                .antMatchers("/saml2login").authenticated()
                .and()
                .saml2Login()
                .relyingPartyRegistrationRepository(
                        new InMemoryRelyingPartyRegistrationRepository(
                                getSaml2AuthenticationConfiguration()
                        )
                );

但它不起作用

您完全可以对URL子集应用SAML2身份验证。你能解释一下你的配置是如何不起作用的吗?SAML2没有被触发吗?您完全可以对URL的子集应用SAML2身份验证。你能解释一下你的配置是如何不起作用的吗?SAML2是否未被触发?