I try to bring up secure communication with our customer using oauth 2.0. first of all I have to confess that I am totally new to oauth. Used technologies are as follow: wicket, spring, I took the following steps.
Add dependency in pom.xml
<dependency>
<groupId>org.springframework.security.oauth</groupId>
<artifactId>spring-security-oauth</artifactId>
<version>1.0.0.M3</version>
</dependency>Then I added the following in WEB-INF/web.xml
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>Finally I added these lines to META-INF/spring-context/application.xml
<beans:bean id="tokenServices" class="org.springframework.security.oauth2.provider.token.InMemoryOAuth2ProviderTokenServices">
<beans:property name="supportRefreshToken" value="true" />
</beans:bean>
<oauth:provider client-details-service-ref="clientDetails" token-services-ref="tokenServices">
<oauth:verification-code user-approval-page="/oauth/confirm_access" />
</oauth:provider>
<oauth:client-details-service id="clientDetails">
<oauth:client clientId="foo" authorizedGrantTypes="authorization_code" />
</oauth:client-details-service>
But I got this error:
25 09 12 14:48:11:921:ERROR: [ContextLoader] Context initialization failed
java.lang.NoClassDefFoundError: org/springframework/core/env/ConfigurableEnvironment
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
at java.lang.Class.getConstructor0(Class.java:2714)
at java.lang.Class.getDeclaredConstructor(Class.java:2002)
...