title: Spring REST design public and authenticated API
body: <p>I'm trying to design an application that should expose two global API path:</p>
  
  <ul>
  <li><code>/</code> user must be authenticated</li>
  <li><code>/public</code> no authentication</li>
  </ul>
  
  <p>Moreover <code>/public</code> API will offer light version of some <code>/</code> API by displaying less informations that is not authorize if no authentication is provided.</p>
  
  <p>Even if <code>Controller</code> does not contains core function, some of them provide data validation or other check. Thus if I want to create a <code>/public</code> version of a current API I have 4 solutions:</p>
  
  <ol>
  <li>Duplicate code</li>
  <li><code>@Autowired</code> <code>/</code> controller and use method call</li>
  <li><code>forward</code> request (I can't <code>redirect</code> because security filter will be applied)</li>
  <li>Create <code>Controller</code> that manage both <code>/</code> and <code>/public</code> API</li>
  </ol>
  
  <p>Is there any good practice or pattern for my scenario?</p>