Ok, answering myself.
It is probably an autoconfiguration problem.
We have in
GoogleAuthenticatorAuthenticationEventExecutionPlanConfiguration.java:
296 @ConditionalOnMissingBean(name = "googleAuthenticatorAccountRegistry")
297 @Bean
298 @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
299 public OneTimeTokenCredentialRepository googleAuthenticatorAccountRegistry(
300 final ConfigurableApplicationContext applicationContext,
(it initializes the default JSON/REST/inMemory repository
and in
CasGoogleAuthenticatorJpaAutoConfiguration.java
70 @Bean
71 @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
72 @ConditionalOnMissingBean(name = "googleAuthenticatorAccountRegistry")
73 public OneTimeTokenCredentialRepository googleAuthenticatorAccountRegistry(
74 @Qualifier("googleAuthenticatorInstance")
(this initializes the JPA repository)
So it depends on the execution order, what is available in the application.
For me the following solution works. Delete line 72 in CasGoogleAuthenticatorJpaAutoConfiguration.java, put the file in the war-overlay, rebuild CAS and JPA device registration works again.
Best regards
Klaus-Dieter