I am using Spring Boot - 2.6.6 and Spring Security - 5.7.0-M2 with the spring-security-saml2-service-provider library to create a SAML service provider application. I followed Spring's sample project Spring Security SAML2 Sample so my setup looks very similar.
I want to turn off the generated Login and Logout pages located on /login and /logout. The login page shows a link to each IDP configured and the logout page has a button that initiates the POST logout flow.
They appear to be created by Springs internal code - Saml2LoginConfigurer.initDefaultLoginFilter when Saml2LoginConfigurer.loginPage is not set or the DefaultLoginPageGeneratingFilter is active. Setting the loginPage variable only changes where the login page is displayed and breaks the metadata configuration from my Identity Provider: it does not turn the login page off. I had no success trying to turn off the DefaultLoginPageGeneratingFilter.
How could I do this?