Spring Boot 1.3.3 @EnableResourceServer and @EnableOAuth2Sso at the same time
<p>I want my server be a ResourceServer, which can accept a Bearer Access token</p>

<p>However, If such token doesn't exist, I want to use the OAuth2Server to authenticate my user.</p>

<p>I try to do like:</p>

<pre><code>@Configuration
@EnableOAuth2Sso
@EnableResourceServer
public class SecurityConfiguration extends WebSecurityConfigurerAdapter{

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.authorizeRequests().anyRequest().authenticated();
    }
}
</code></pre>

<p>However, in this case, only the <code>@EnableResourceServer</code> annotation works. It returns </p>

<pre><code>Full authentication is required to access this resource
</code></pre>

<p>And do not redirect me to the login page</p>

<p>I mentioned that the <code>@Order</code> is important, if I add the <code>@Order(0)</code> annotation,
I will be redirect to the login page, however, I cannot access my resource with the access_token in Http header:</p>

<pre><code>Authorization : Bearer 142042b2-342f-4f19-8f53-bea0bae061fc
</code></pre>

<p>How can I achieve my goal? I want it use Access token and SSO at the same time.</p>

<p>Thanks~</p>