Using spring-security-oauth2 to secure my resources against a SSO endpoint that can act as an authorization server. I'm a bit confused when the documentation states:
The provider role in OAuth 2.0 is actually split between Authorization Service and Resource Service, and while these sometimes reside in the same application, with Spring Security OAuth you have the option to split them across two applications, and also to have multiple Resource Services that share an Authorization Service.
But I don't think I have found an example of this happening. In sparklr/tonr the authorization server and the resource server reside in the same application. The only example I've seen from searching is this spring-servlet.xml, which requires this custom implementation of ResourceServerTokenServices to work.
I'd like to avoid writing a custom implementation of ResourceServerTokenServices if at all possible. Is there another way to support an external authorization server in a resource server? Something along the lines of:
<bean class="com.example.ExternalAuthorizationServerTokenServices"
p:remote-url="https://my-oauth-compatible-sso.com"
p:token-endpoint="/oauth/access_token"
p:authorize-endpoint="/oauth/authorize" />
Is this possible?
*EDIT: I'll add that as a workaround (or maybe this is the intended solution) I'm using a jdbc token store and relying on the fact that both servers happen to have access to that database.