title: Spring secure endpoint with only client credentials (Basic)
body: <p>I have oauth2 authorization server with one custom endpoint (log out specific user manually as admin)
  I want this endpoint to be secured with rest client credentials (client id and secret as Basic encoded header value), similar to /oauth/check_token.</p>
  
  <p>This endpoint can be called only from my resource server with specific scope.</p>
  
  <ol>
  <li>I need to check if the client is authenticated.</li>
  <li>I would like to be able to add @PreAuthorize("#oauth2.hasScope('TEST_SCOPE')")on the controller`s method.</li>
  </ol>
  
  <p>I could not find any docs or way to use the Spring`s mechanism for client authentication check.</p>
  
  <p><strong>EDIT 1</strong></p>
  
  <p>I use java config not an xml one</p>