Are there any analog of cuba.rest.storeTokensInDb in JMIX?
I need to store tokens in DB instead of memory
Finally, I solved this by importing org.springframework.security.oauth:spring-security-oauth2 dependency and registering the following bean:
@Bean(name = "sec_TokenStore")
@Primary
protected TokenStore tokenStore() {
JdbcTokenStore tokenStore = new JdbcTokenStore(dataSource());
tokenStore.setAuthenticationKeyGenerator(new UniqueAuthenticationKeyGenerator());
return tokenStore;
}
2 Likes