Skip to content

Instantly share code, notes, and snippets.

@timoyuen
Forked from maggandalf/root-context.xml
Last active August 29, 2015 14:06
Show Gist options
  • Save timoyuen/ec85cf60f7a3ade17c81 to your computer and use it in GitHub Desktop.
Save timoyuen/ec85cf60f7a3ade17c81 to your computer and use it in GitHub Desktop.
<oauth:client token-services-ref="oauth2TokenServices" />
<beans:bean id="oauth2TokenServices"
class="org.springframework.security.oauth2.consumer.token.InMemoryOAuth2ClientTokenServices" />
<oauth:resource id="cv" type="authorization_code"
clientId="foo" accessTokenUri="http://localhost:8080/cv/oauth/authorize"
userAuthorizationUri="http://localhost:8080/cv/oauth/user/authorize" />
<beans:bean id="cvService" class="org.springsource.oauth.CVServiceImpl">
<beans:property name="cvURL" value="http://localhost:8080/cv/cvs"></beans:property>
<beans:property name="cvRestTemplate">
<beans:bean class="org.springframework.security.oauth2.consumer.OAuth2RestTemplate">
<beans:constructor-arg ref="cv"/>
</beans:bean>
</beans:property>
<beans:property name="tokenServices" ref="oauth2TokenServices"></beans:property>
</beans:bean>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment