Spring boot oauth2 token
<p>I have an ouath2 module, server running on port 9999, and when I request "localhost:9999/oauth/token" I do get the token.
However, even the auth server and the REST endpoints are in the same project (different modules, but they know about each other), the controllers seem to not care if the request holds a token.</p>

<p>Now, here comes the interesting stuff:</p>

<p>If I add this code to my application.yml, the controllers do not care about the auth at all.</p>

<pre><code>security:
  basic:
    enabled: false
  oauth2:
    client:
      client-id: acme
      client-secret: acmesecret
      access-token-uri: http://localhost:9999/oauth/token
      user-authorization-uri: http://localhost:9999/oauth/authorize
    resource:
      user-info-uri: http://localhost:9999/user
      token-info-uri: http://localhost:9999/oauth/check_token

auth:
 server:
  url: http://localhost:9999/oauth/check_token/
  clientId: acme
  clientSecret: acmesecret
oauth2:
 resource:
  userInfoUri: http://localhost:9999/user
</code></pre>

<p>But, when I remove it and try to request the controller I get this: </p>

<pre><code>{
  "timestamp": 1472114046044,
  "status": 401,
  "error": "Unauthorized",
  "message": "Full authentication is required to access this resource",
  "path": "/gamification/api/ebubo"
}
</code></pre>

<p>Any ideas? Anyone?</p>