@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        @Bean
        public FactoryBean<EntityManagerFactory> googleAuthenticatorEntityManagerFactory(
            final CasConfigurationProperties casProperties,
            @Qualifier("jpaGoogleAuthenticatorVendorAdapter")
            final JpaVendorAdapter jpaGoogleAuthenticatorVendorAdapter,
            @Qualifier("dataSourceGoogleAuthenticator")
            final DataSource dataSourceGoogleAuthenticator,
            @Qualifier("jpaPackagesToScanGoogleAuthenticator")
            final BeanContainer<String> jpaPackagesToScanGoogleAuthenticator,
            @Qualifier(JpaBeanFactory.DEFAULT_BEAN_NAME)
            final JpaBeanFactory jpaBeanFactory) {
            val ctx = JpaConfigurationContext.builder()
                .jpaVendorAdapter(jpaGoogleAuthenticatorVendorAdapter)
                .persistenceUnitName("jpaGoogleAuthenticatorContext")
                .dataSource(dataSourceGoogleAuthenticator)
                .packagesToScan(jpaPackagesToScanGoogleAuthenticator.toSet())
                .build();
            return jpaBeanFactory.newEntityManagerFactoryBean(ctx,
                casProperties.getAuthn().getMfa().getGauth().getJpa());
        }
This is {@link CasGoogleAuthenticatorJpaAutoConfiguration}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-gauth-jpa/src/main/java/org/apereo/cas/config/CasGoogleAuthenticatorJpaAutoConfiguration.java