What is the function of the oauth_code and oauth_client_token tables within the tokenstore database? I've converted the tokenstore database to a Jdbc implementation and noticed that neither of these tables ever seem to contain records. I thought the oauth_client_token table would contain access tokens created using the Oauth Client Credentials flow, but find access tokens using this flow appear in the oauth_access_token table.
The oauth_code table is used by the JdbcAuthorizationCodeServices and the oauth_client_details table by the JdbcClientDetailsService.
Thanks for the explanation, but I asked about the oauth_client_token NOT the oauth_client_details table in the Tokenstore database.
Right, sorry. That one is JdbcClientTokenServices.
Would you please explain when oauth_client_token will be populated, I am seeing oauth_client_details as base/master and after token generation oauth_access_token is getting populated but I am unable to understand when oauth_client_token will be populated?
It would be really great to get docs for this, as a lot of people suffer from that according to google.
From my understanding, one has to set the token store like this:
@Bean
fun tokenStore(): JdbcTokenStore {
return JdbcTokenStore(dataSource)
}
override fun configure(endpoints: AuthorizationServerEndpointsConfigurer) {
endpoints
.authenticationManager(authenticationManager)
.userDetailsService(investorService)
.tokenStore(tokenStore())
}
This is sparsely documented and probably orphaned due to the state of the project, but I believe that the purpose here is for OAuth2 client applications to be able to save tokens that they've obtained (on behalf of users, primarily) and to look up the right one when needed. For example, an application that consumed the GitHub OAuth2 API could save the token here and look it up by "(GitHub, Bob)" when needed.
I'm facing the same question as AbhiRS. My tables (oauth_client_details and oauth_access_token) are being populated on token creation but i don't understand when is needed the oauth_client_token table. I'd be really useful to have more information about this.
I'm facing the same question as AbhiRS. My tables (oauth_client_details and oauth_access_token) are being populated on token creation but i don't understand when is needed the oauth_client_token table. I'd be really useful to have more information about this.
+1 here
Most helpful comment
Would you please explain when oauth_client_token will be populated, I am seeing oauth_client_details as base/master and after token generation oauth_access_token is getting populated but I am unable to understand when oauth_client_token will be populated?