spring-security returns 401 despite authorizeRequests().anyRequest().permitAll()
问题 I'm using spring-security and spring-security-oauth2 (JWT access tokens) for authentication and authorization. The idea is to let all requests through, but to be able to distinguish between authenticated users and unauthenticated users. As soon as I enable @EnableResourceServer my configured HttpSecurity seems to get ignored. And requests return 401: { "error": "unauthorized", "error_description": "Full authentication is required to access this resource" } Here's the config: