Skip to content

Instantly share code, notes, and snippets.

@maggandalf
Created May 10, 2011 16:28
Show Gist options
  • Save maggandalf/964828 to your computer and use it in GitHub Desktop.
Save maggandalf/964828 to your computer and use it in GitHub Desktop.
Client Spring Security OAuth Configuration
<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