Skip to content

Commit 1d8ea63

Browse files
martinboulaisrwinch
authored andcommitted
Fix typo in HTTP Basic Auth Provider documentation
The documentation states that setting the header `X-Requested-By` will remove the `WWW-Authenticate` header from the response. However, after testing this and reading the library code it looks like the header to set is `X-Requested-With` (X-Requested-By is mentioned nowhere except in this documentation file), so I propose this simple PR to fix this. Signed-off-by: Martin Boulais <31805063+martinboulais@users.noreply.github.com>
1 parent d20c88e commit 1d8ea63

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • docs/modules/ROOT/pages/servlet/authentication/passwords

docs/modules/ROOT/pages/servlet/authentication/passwords/basic.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The `RequestCache` is typically a `NullRequestCache` that does not save the requ
2424

2525
[NOTE]
2626
====
27-
The default HTTP Basic Auth Provider will suppress both Response body and `WWW-Authenticate` header in the 401 response when the request was made with a `X-Requested-By: XMLHttpRequest` header.
27+
The default HTTP Basic Auth Provider will suppress both Response body and `WWW-Authenticate` header in the 401 response when the request was made with a `X-Requested-With: XMLHttpRequest` header.
2828
This allows frontends to implement their own authentication code, instead of triggering the browser login dialog.
2929
To override, implement your own javadoc:org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint[].
3030
====

0 commit comments

Comments
 (0)