While that looks like it would address the issue, i believe I will wait as 
my copy+paste'd solution works now.  I really dislike the arbitrary nature 
of CAS now, while the xml wasn't easy/fun, i definitely think we've gone 
backwards now.

On Monday, September 24, 2018 at 11:51:48 PM UTC-4, Colin Wilkinson wrote:
>
> Hi,
>
> I had to do something similar for the Password Management and did not want 
> to recreate everything. So the solution I came up with was to remove the 
> passwordManagementWebflowConfigurer from the execution plan and set the 
> order to one before my configurer and readd the 
> passwordManagementWebflowConfigurer.
>
> It's serious issue and pain that you can set a definite order to the item 
> like these CasWebflowConfigurer that actually rely on the order to execute. 
> This needs to be able to be configured.
>
> I hope this helps.
>
>     @Autowired
>     @Qualifier("passwordManagementWebflowConfigurer")
>     private CasWebflowConfigurer passwordManagementWebflowConfigurer;
>
>     @Override
>     public void configureWebflowExecutionPlan(final 
> CasWebflowExecutionPlan plan) {
>         plan.getWebflowConfigurers().removeIf(casWebflowConfigurer -> 
> casWebflowConfigurer.getName().equals(passwordManagementWebflowConfigurer.getName()));
>         final int order = Ordered.LOWEST_PRECEDENCE - 100;
>
>         try {
>             if 
> (AopUtils.isJdkDynamicProxy(passwordManagementWebflowConfigurer)) {
>                 ((PasswordManagementWebflowConfigurer) ((Advised) 
> passwordManagementWebflowConfigurer).getTargetSource().getTarget()).setOrder(order);
>             } else {
>                 ((PasswordManagementWebflowConfigurer) 
> passwordManagementWebflowConfigurer).setOrder(order);
>             }
>         } catch (final Exception exception) {
>             LOGGER.error("The following error ocurred during reconfigure 
> of startup sequence.", exception);
>         }
>
>         
> plan.registerWebflowConfigurer(passwordManagementWebflowConfigurer);
>         
> plan.registerWebflowConfigurer(vicUniPasswordManagementWebflowReconfigurer());
>     }
>
>
>
> On Tuesday, 25 September 2018 12:49:25 UTC+10, Andy Ng wrote:
>>
>> Hi Curtis,
>>
>> Ah I missed to mention something, 
>>
>> when you tries to override a Bean inside a Configuration file, whether or 
>> not is actually override success depends on the load sequence. Which one 
>> load last will be the actual bean to be used.
>> See: 
>> https://stackoverflow.com/questions/11833804/overriding-bean-configuration-in-spring
>>
>> To make sure your defined bean takes effect, you might need to use the 
>> @Import notation.
>>
>> So you could try out the following:
>>
>> ===========================================================================================
>> @Configuration("myDomainX509AuthenticationWebflowConfiguration ")
>> @EnableConfigurationProperties(CasConfigurationProperties.class)
>> @Slf4j
>> @Import(X509AuthenticationWebflowConfiguration.class)
>> public class MyDomainX509AuthenticationWebflowConfiguration implements 
>> CasWebflowExecutionPlanConfigurer {
>>
>> ..........
>>
>>
>>
>>
>> ===========================================================================================
>>
>> If this still doens't work, then maybe you might needs to stick to your 
>> solution then...
>>
>> Cheers!
>> - Andy
>>
>>

-- 
- 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 cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/5c83782a-506f-41d7-9c64-4fecac01b347%40apereo.org.

Reply via email to