We already have an OAuth2 authorization server set up, so I need to create a corresponding resource server (separate server). We plan to use the Spring Security OAuth2 project.
This is possible as long as the authorization server and resource server(s) access a shared tokenStore
(e.g. using JdbcTokenStore
with a common dataSource
). You can just use DefaultTokenServices
with a reference to your shared tokenStore
. Below is an example Spring config which you should be able to tweak to fit your needs: