Closed
Description
Hello, i caught strange behavior, when did disable anonymous() in WebSecurityConfigurerAdapter with oauth2ResourceServer().jwt() option.
This setting throws an exception on startup: An AuthenticationManager is required.
Used version: 2.2.4.RELEASE.
The same settings work on 2.1.x.RELEASE
Yes, i understand, if specify a bean, the error will disappear, but this behavior seems strange.
public class AnonymousDisableApplication extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests()
.anyRequest()
.authenticated()
.and()
.anonymous()
.disable()
.oauth2ResourceServer()
.jwt()
;
}
}