title: implementing authentication using oauth 2.0 and wicket
body: <p>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.</p>
  
  <ol>
  <li><p>Add dependency in pom.xml</p>
  
  <p>&lt;dependency&gt;
  <br/>
  &lt;groupId&gt;org.springframework.security.oauth&lt;&#47;groupId&gt;
  <br/>
  &lt;artifactId&gt;spring-security-oauth&lt;&#47;artifactId&gt;
  <br/>
  &lt;version&gt;1.0.0.M3&lt;&#47;version&gt;
  <br/>
  &lt;&#47;dependency&gt;</p></li>
  <li><p>Then I added the following in WEB-INF&#47;web.xml</p>
  
  <p>&lt;filter&gt;
  <br/>
  &lt;filter-name&gt;springSecurityFilterChain&lt;&#47;filter-name&gt;
  <br/>
  &lt;filter-class&gt;org.springframework.web.filter.DelegatingFilterProxy&lt;&#47;filter-class&gt;
  <br/>
  &lt;&#47;filter&gt;
  <br/>
  &lt;filter-mapping&gt;
  <br/>
  &lt;filter-name&gt;springSecurityFilterChain&lt;&#47;filter-name&gt;
  <br/>
  &lt;url-pattern&gt;&#47;*&lt;&#47;url-pattern&gt;
  <br/>
  &lt;&#47;filter-mapping&gt;</p></li>
  <li><p>Finally I added these lines to META-INF&#47;spring-context&#47;application.xml</p>
  
  <p>&lt;beans:bean id="tokenServices" class="org.springframework.security.oauth2.provider.token.InMemoryOAuth2ProviderTokenServices"&gt;
  <br/>
  &lt;beans:property name="supportRefreshToken" value="true" &#47;&gt;
  <br/>
  &lt;&#47;beans:bean&gt;
  <br/>
  &lt;oauth:provider client-details-service-ref="clientDetails" token-services-ref="tokenServices"&gt;
  <br/>
  &lt;oauth:verification-code user-approval-page="&#47;oauth&#47;confirm_access" &#47;&gt;
  <br/>
  &lt;&#47;oauth:provider&gt;
  <br/>
  &lt;oauth:client-details-service id="clientDetails"&gt;
  <br/>
  &lt;oauth:client clientId="foo" authorizedGrantTypes="authorization_code" &#47;&gt;
  <br/>
  &lt;&#47;oauth:client-details-service&gt;</p></li>
  </ol>
  
  <p>But I got this error:</p>
  
  <pre><code>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)
  ...
  </code></pre>