@ConditionalOnMissingBean(name = ConsentRepository.BEAN_NAME)
        @Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        public ConsentRepository consentRepository(final CasConfigurationProperties casProperties) {
            return FunctionUtils.doUnchecked(() -> {
                val location = casProperties.getConsent().getJson().getLocation();
                if (location != null) {
                    LOGGER.warn("Storing consent records in [{}]. This MAY NOT be appropriate in production. "
                        + "Consider choosing an alternative repository format for storing consent decisions", location);
                    return new JsonConsentRepository(location);
                }

                val groovy = casProperties.getConsent().getGroovy().getLocation();
                if (groovy != null && CasRuntimeHintsRegistrar.notInNativeImage()) {
                    return new GroovyConsentRepository(groovy);
                }

                LOGGER.warn("Storing consent records in memory. This option is ONLY relevant for demos and testing purposes.");
                return new InMemoryConsentRepository();
            });
        }
This is {@link CasConsentCoreAutoConfiguration}.

@author Misagh Moayyed
@since 5.1.0
support/cas-server-support-consent-core/src/main/java/org/apereo/cas/config/CasConsentCoreAutoConfiguration.java