- First run the
spring-oauth-server
- Run
spring-resource-server
,spring-oauth-client
,spring-oauth-client-2
- Go to
http://127.0.0.1:8082/message
. Which is an endpoint ofspring-oauth-client
. - It will require you to login. Login with username:
admin
, and password:admin
to access the resource. - Go to
http://127.0.0.1:8083/message
. Which is an endpoint ofspring-oauth-client-2
having different client-id and secret than thespring-oauth-client
. - But it won't require you to login again. You will be able to get the resource without login.
Somehow this flow does not work if you don't have the spring-oauth-server
running in a different host than the clients. That's why you will find the host in the server address of spring-oauth-server
is given localhost
and the clients and resource server are given 127.0.0.1
.