有一個在春季安全的OAuth實現與以下行固定的OAuth端點的普遍做法:在spring安全中使用requestMatchers()。antMatchers()時沒有動詞的原因是什麼?
.requestMatchers().antMatchers("/login", "/oauth/authorize", "/oauth/confirm_access")
整個設置是這樣的:
http
.formLogin().loginPage("/login").permitAll()
.and()
.requestMatchers().antMatchers("/login", "/oauth/authorize", "/oauth/confirm_access")
.and()
.authorizeRequests().anyRequest().authenticated();
能有人給我解釋一下爲什麼需要特定的行,因爲下一行明確指出所有請求都必須經過身份驗證?