Well,sometimes redefining bean in deployerContextConfig.xml works. Just override configuration itself. Copy it from cas sources into your project, modify and build it. Final .war will contain your .class in root(/WEB-INF/classes/..), which has higher priority than one packed in .jar. Unfortunatelly it is only possible way to customize cas(except forking), since devs got rid of xml spring context configurations. I already have patched two dozens of classes this way in cas 5.0.x branch. In modern cas Spring plays role of web framework, but not as component (de)coupling mechanism, since component wiring hardcoded into class files, and cannot be done in xml files by declareing new bean and changing references. Overlay method of using cas is actually hell for customizer. Every other bean you have override using described here method, becuase other methods to patch components DI are not working. The same can be applied for login-webflow.xml - it is almost empty, most states are dynamically build during cas startup, and it is impossible to control flow.
2017-06-24 0:30 GMT+03:00 Geoff <[email protected]>: > Hello, > > I'd like to implement my own version of WebApplicationServiceFactory and > SamlServiceFactory in CAS 5.1.0 however I don't see a way to make CAS my > implementations instead of the out of the box versions. > > In my CAS 4 implementation this was accomplished by specifying custom > ArgumentExtractors in argumentExtractorsConfiguration.xml. In CAS 5 it > looks like a single argument extractor is defined in CasCoreWebConfiguration > and it effectively uses ServiceFactories found on any configuration classes > that implement ServiceFactoryConfigurer. This provides a nice mechanism to > add new ServiceFactories but I don't see a way to override the existing > ones. > > It seems like an easy way to allow this sort of customization would be to > annotate the ArgumentExtractor defined in CasCoreWebConfiguration with > ConditionalOnMissingBean so that it could be overriden. Or maybe I'm > overlooking an easier way of modifying the behavior in > WebApplicationServiceFactory and SamlServiceFactory? > > Thanks! > > Geoff > > -- > - CAS gitter chatroom: https://gitter.im/apereo/cas > - CAS mailing list guidelines: > https://apereo.github.io/cas/Mailing-Lists.html > - CAS documentation website: https://apereo.github.io/cas > - CAS project website: https://github.com/apereo/cas > --- > 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/e415701d-7aa7-46d9-b529-a27dfafd30f4%40apereo.org. -- - CAS gitter chatroom: https://gitter.im/apereo/cas - CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html - CAS documentation website: https://apereo.github.io/cas - CAS project website: https://github.com/apereo/cas --- 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/CAGbteJJncdf2Pn_V7ZwBGzsp%2BdfWShL-%3DBNZdW8OL5S6ApSeqw%40mail.gmail.com.
