royclarkson / spring-rest-service-oauth

A simple OAuth protected REST service built with Spring Boot and Spring Security OAuth
Apache License 2.0
664 stars 339 forks source link

Change InMemoryTokenStore to JdbcTokenStore #33

Closed roywang1985 closed 9 years ago

roywang1985 commented 9 years ago

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?

roywang1985 commented 9 years ago

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