royclarkson / spring-rest-service-oauth

A simple OAuth protected REST service built with Spring Boot and Spring Security OAuth

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change InMemoryTokenStore to JdbcTokenStore

roywang1985 opened this issue · comments

I just change InMemoryTokenStore to JdbcTokenStore and use JdbcClientDetailsService.
It was work when curl grant_type with password.
But it failed when reflesh token.
{
"error" : "unauthorized",
"error_description" : "User null does not exist!"
}
I found some message in Spring docs.
"userDetailsService: if you inject a UserDetailsService or if one is configured globally anyway (e.g. in a GlobalAuthenticationManagerConfigurer) then a refresh token grant will contain a check on the user details, to ensure that the account is still active"
I don't know how to check user details for reflesh token with no username and password?
Or what is the correct steps to configure Jdbc?

Sorry, It's my fault.There is one class User is not implements Serializable