Skip to content

Commit ef442de

Browse files
romilptljzheaux
authored andcommitted
WebSecurityConfigurerAdapter JavaDoc
Closes gh-8784
1 parent 502d28f commit ef442de

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

config/src/main/java/org/springframework/security/config/annotation/web/configuration/WebSecurityConfigurerAdapter.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,15 @@ public void run() {
332332
/**
333333
* Override this method to configure {@link WebSecurity}. For example, if you wish to
334334
* ignore certain requests.
335+
*
336+
* Endpoint used in this method ignores the
337+
* spring security filters, headers, csrf etc. see
338+
* {@link org.springframework.security.config.annotation.web.configurers.HeadersConfigurer} and
339+
* {@link org.springframework.security.config.annotation.web.configurers.CsrfConfigurer }
340+
*
341+
* Instead, if you want to protect public endpoints against common vulnerabilities, then see
342+
* {@link #configure(HttpSecurity)} and the {@link HttpSecurity#authorizeRequests}
343+
* configuration method.
335344
*/
336345
public void configure(WebSecurity web) throws Exception {
337346
}
@@ -345,6 +354,10 @@ public void configure(WebSecurity web) throws Exception {
345354
* http.authorizeRequests().anyRequest().authenticated().and().formLogin().and().httpBasic();
346355
* </pre>
347356
*
357+
* Public endpoints that require defense against common vulnerabilities can be specified here.
358+
* See {@link HttpSecurity#authorizeRequests} and the `permitAll()` authorization rule
359+
* for more details.
360+
*
348361
* @param http the {@link HttpSecurity} to modify
349362
* @throws Exception if an error occurs
350363
*/

0 commit comments

Comments
 (0)