title: Spring OAuth2 explain Authorization server configuration
body: <p>I am trying to implement OAuth security and met a problem that for me is not clear enough configuration class.</p>
  
  <p>While implementing <code>AuthorizationServerConfigurer</code> i have three configurers: </p>
  
  <ul>
  <li><code>ClientDetailsServiceConfigurer</code> used to provide the way how and from where to get client details. As an example, it can be service which provides registered clients from the database.</li>
  </ul>
  
  <p>When it comes to  <code>AuthorizationServerSecurityConfigurer</code> and <code>AuthorizationServerEndpointsConfigurer</code> I am not sure what they do or how they should be configured. In the <a href="http://projects.spring.io/spring-security-oauth/docs/oauth2.html" rel="nofollow noreferrer">documentation</a> it said only:</p>
  
  <blockquote>
    <p><code>AuthorizationServerEndpointsConfigurer</code>: defines the authorization and
    token endpoints and the token services.</p>
  </blockquote>
  
  <p>Maybe someone can explain in simple words what these two configurers do, or what they are used for.</p>