Skip to content

Commit 14e4a81

Browse files
romilptljzheaux
authored andcommitted
WebSecurityConfigurerAdapter JavaDoc
Closes gh-8784
1 parent be07593 commit 14e4a81

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
@@ -325,6 +325,15 @@ public void run() {
325325
/**
326326
* Override this method to configure {@link WebSecurity}. For example, if you wish to
327327
* ignore certain requests.
328+
*
329+
* Endpoint used in this method ignores the
330+
* spring security filters, headers, csrf etc. see
331+
* {@link org.springframework.security.config.annotation.web.configurers.HeadersConfigurer} and
332+
* {@link org.springframework.security.config.annotation.web.configurers.CsrfConfigurer }
333+
*
334+
* Instead, if you want to protect public endpoints against common vulnerabilities, then see
335+
* {@link #configure(HttpSecurity)} and the {@link HttpSecurity#authorizeRequests}
336+
* configuration method.
328337
*/
329338
public void configure(WebSecurity web) throws Exception {
330339
}
@@ -338,6 +347,10 @@ public void configure(WebSecurity web) throws Exception {
338347
* http.authorizeRequests().anyRequest().authenticated().and().formLogin().and().httpBasic();
339348
* </pre>
340349
*
350+
* Public endpoints that require defense against common vulnerabilities can be specified here.
351+
* See {@link HttpSecurity#authorizeRequests} and the `permitAll()` authorization rule
352+
* for more details.
353+
*
341354
* @param http the {@link HttpSecurity} to modify
342355
* @throws Exception if an error occurs
343356
*/

0 commit comments

Comments
 (0)