只要授权服务器和资源服务器访问共享tokenStore(例如使用JdbcTokenStore与公共数据源),这是可能的。您可以使用DefaultTokenServices引用您的共享tokenStore。下面是一个示例Spring配置,您应该能够调整以适应您的需要:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:security="http://www.springframework.org/schema/security"
xmlns:oauth2="http://www.springframework.org/schema/security/oauth2"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.1.xsd
http://www.springframework.org/schema/security/oauth2
http://www.springframework.org/schema/security/spring-security-oauth2.xsd">
entry-point-ref="authenticationEntryPoint" access-decision-manager-ref="accessDecisionManager">