rohitghatol / spring-boot-microservices

Spring Boot Template for Micro services Architecture - Show cases how to use Zuul for API Gateway, Spring OAuth 2.0 as Auth Server, Multiple Resource (Web Services) Servers, Angular Web App, Eureka dor registration and Discover and Hystrix for circuit breaker
Apache License 2.0
1.76k stars 919 forks source link

invalid token for user service #14

Closed ajayaks closed 7 years ago

ajayaks commented 7 years ago

Hi Rohit,

I have setup the server and user service. Also setup resource server for user service , basically i want to secure this service with oauth.

I am able to get the access token but when i access "http://localhost:port/users" its not working and i am getting invalid token.

2017-01-06 02:23:37.031 DEBUG [usermanagement-service,5fee9c7906f954da,5fee9c7906f954da,true] 40392 --- [nio-8080-exec-6] s.s.o.p.e.DefaultOAuth2ExceptionRenderer : Written [error="invalid_token", error_description="Invalid access token: bea0c12f-7919-4832-a1c9-48fb4179fe7b"] as "application/json;charset=UTF-8" using [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter@31052c9b]

Please suggest.

ajayaks commented 7 years ago

i have fixed it so closing. Thanks.