Yan,
Copy RegisteredServiceResponseHeadersEnforcementFilter into your project and
modify it. The build will replace the cas version with yours.
You may need to add some compile dependencies to build.gradle.
Ray
On Mon, 2022-10-17 at 07:19 -0700, Yan Zhou wrote:
Notice: This message was sent from outside the University of Victoria email
system. Please be cautious with links and sensitive information.
Hi there,
I am using CAS 6.4.x.
CasFiltersConfiguration defines filters, I wish to provide my own
RegisteredServiceResponseHeadersEnforcementFilter (using a different name).
How would I do that without copying the entire CasFiltersConfiguration or
RegisteredServiceResponseHeadersEnforcementFilter and just change a couple
lines?
I understand this is a Sprint boot question, but I think some may have a quick
answer for me. Thanks a lot!
Yan
@ConditionalOnProperty(prefix = "cas.http-web-request.header", name =
"enabled", havingValue = "true", matchIfMissing = true)
@RefreshScope
@Bean
public FilterRegistrationBean responseHeadersSecurityFilter() {
val header = casProperties.getHttpWebRequest().getHeader();
val initParams = new HashMap<String, String>();
...............
val bean = new
FilterRegistrationBean<RegisteredServiceResponseHeadersEnforcementFilter>();
bean.setFilter(new
RegisteredServiceResponseHeadersEnforcementFilter(servicesManager.getObject(),
argumentExtractor.getObject(),
authenticationRequestServiceSelectionStrategies.getObject(),
registeredServiceAccessStrategyEnforcer.getObject()));
...............
return bean;
}
--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/456500ae1bdd1d44a5f092da1f09dfd142920b9e.camel%40uvic.ca.