Figured out the solution; just posting here if it helps anyone.
I create custom config endpoint to ignore my endpoint and then added the filename in org.springframework.boot.autoconfigure.AutoConfiguration.imports so that it can discover the config class
package com.test.config;
import org.apereo.cas.CasProtocolConstants;
import org.apereo.cas.web.CasWebSecurityConfigurer;
import org.apache.commons.lang3.StringUtils;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import java.util.List;
@Configuration
public class CustomCasCoreWebEndpointsConfiguration {
@Bean
@Primary // Optional: Makes this bean the preferred one if there are multiple beans of the same type
public CasWebSecurityConfigurer<Void> casProtocolEndpointConfigurer() {
return new CasWebSecurityConfigurer<Void>() {
@Override
public List<String> getIgnoredEndpoints() {
// Custom implementation
return List.of(
StringUtils.prependIfMissing(CasProtocolConstants.ENDPOINT_LOGIN, "/"),
StringUtils.prependIfMissing(CasProtocolConstants.ENDPOINT_LOGOUT, "/"),
StringUtils.prependIfMissing(CasProtocolConstants.ENDPOINT_VALIDATE, "/"),
StringUtils.prependIfMissing(CasProtocolConstants.ENDPOINT_SERVICE_VALIDATE, "/"),
StringUtils.prependIfMissing(CasProtocolConstants.ENDPOINT_PROXY, "/"),
"/sso/status" // Add your custom endpoint here
);
}
};
}
}