title: Setting access token to cookie in Spring Security OAuth2
body: <p>I would like to write OAuth2 access token to a cookie instead of writing to response. Since my OAuth request uses <code>/oauth/token</code> endpoint defined in <code>TokenEndpoint.java</code> of Spring Security OAuth2 module, the token is always written to response.</p>
  
  <p>How can I remove this token from response and set to cookie? Should I implement my own <code>TokenEndpoint</code>?</p>