title: Spring @EnableResourceServer vs @EnableOAuth2Sso
body: <p>Most of the tutorials I've read so far uses <code>@EnableOAuth2Sso</code> instead of <code>@EnableResourceServer</code> on the API gateway. What are the differences? What the <code>OAuth2Sso</code> does in contrast?</p>
  
  <p><strong>Details:</strong> I'm implementing a security/infra architecture for spring-based microservices and single page apps. For some time, while we didn't have security requirements, the SPAs talked directly to open microservices, on different hosts (CORS party).</p>
  
  <p>Now I'm adding a layer of security and the gateway pattern using <code>spring-oauth</code> and <code>spring-zuul</code>. So I have a service (uaa-service) with <code>@EnableAuthorizationServer</code> and a gateway with <code>@EnableZuulProxy</code> &amp; <code>@EnableResourceServer</code>. I only need the <em>password</em> grant type, so each SPA has it's own login form and authenticates with uaa-service token endpoint, trough the gateway, and then proceeds to use that token for further requests.</p>
  
  <p>Is there anything wrong with this approach? Should I be using <code>@EnableOAuth2Sso</code>?</p>