<beans:bean id="oAuth2EntryPoint" class="oauth.OAuth2AuthenticationEntryPoint">
<beans:property name="oAuth2ServiceProperties" ref="oauth2ServiceProperties"/>
</beans:bean>
<beans:bean id="oauth2AuthFilter" class="oauth.OAuth2AuthenticationFilter">
<beans:constructor-arg name="defaultFilterProcessesUrl" value="/internal"/>
<beans:property name="authenticationManager" ref="authenticationManagerClient"/>
<beans:property name="oAuth2ServiceProperties" ref="oauth2ServiceProperties"/>
</beans:bean>
<beans:bean id="oauth2AuthenticationProvider" class="oauth.OAuth2AuthenticationProvider">
<beans:property name="authenticatedUserDetailsService" ref="oAuth2UserDetailsService"/>
<beans:property name="oAuth2ServiceProperties" ref="oauth2ServiceProperties"/>
</beans:bean>
<authentication-manager alias="authenticationManagerClient">
<authentication-provider ref="oauth2AuthenticationProvider">
</authentication-provider>
</authentication-manager>
<beans:bean id="oauth2ServiceProperties" class="oauth.OAuth2ServiceProperties">
<beans:property name="accessTokenUri" value="http://localhost:9999auth/oauth/token"/>
<beans:property name="userAuthorisationUri" value="http://localhost:9999/auth/oauth/authorize"/>
<beans:property name="additionalAuthParams">
<beans:map>
<beans:entry key="scope" value="openid"/>
</beans:map>
</beans:property>
<beans:property name="redirectUri" value="http://localhost:9000/"/>
<beans:property name="clientId" value="acme"/>
<beans:property name="clientSecret" value="acmesecret"/>
<beans:property name="userInfoUri" value="http://localhost:9999/auth/user"/>
</beans:bean>
<beans:bean id="oAuth2UserDetailsService" class="oauth.OAuth2UserDetailsService">
<beans:property name="oAuth2UserDetailsLoader" ref="userFacade"/>
<beans:property name="oAuth2ServiceProperties" ref="oauth2ServiceProperties"/>
</beans:bean>
<beans:bean id="userFacade" class="oauth.UserFacade"/>`