private void validateFlowDefinitionConfiguration(final FlowDefinitionRegistry flowDefinitionRegistry) { if (flowDefinitionRegistry.getFlowDefinitionCount() <= 0) { throw new IllegalArgumentException("Flow definition registry has no flow definitions"); } val msg = "CAS application context cannot find bean [%s]. " + "This typically indicates that configuration is attempting to activate trusted-devices functionality for " + "multifactor authentication, yet the configuration modules that auto-configure the webflow are absent " + "from the CAS application runtime. If you have no need for trusted-devices functionality and wish to let the " + "multifactor authentication provider (and not CAS) remember and record trusted devices for you, you need to " + "turn this behavior off."; if (!applicationContext.containsBean(MFA_SET_TRUST_ACTION_BEAN_ID)) { throw new IllegalArgumentException(String.format(msg, MFA_SET_TRUST_ACTION_BEAN_ID)); } if (!applicationContext.containsBean(MFA_VERIFY_TRUST_ACTION_BEAN_ID)) { throw new IllegalArgumentException(String.format(msg, MFA_VERIFY_TRUST_ACTION_BEAN_ID)); } } }