mirror of
https://github.com/ansible/ansible.git
synced 2026-08-03 08:03:05 +02:00
uri: improve force_basic_auth documentation (#80211)
Add more details about what "true" and "false" mean for the force_basic_auth setting. Give example scenarios when clients may want to use this setting.
This commit is contained in:
@@ -94,9 +94,16 @@ options:
|
|||||||
force_basic_auth:
|
force_basic_auth:
|
||||||
description:
|
description:
|
||||||
- Force the sending of the Basic authentication header upon initial request.
|
- Force the sending of the Basic authentication header upon initial request.
|
||||||
- The library used by the uri module only sends authentication information when a webservice
|
- When this setting is C(false), this module will first try an unauthenticated request, and when the server replies
|
||||||
responds to an initial request with a 401 status. Since some basic auth services do not properly
|
with an C(HTTP 401) error, it will submit the Basic authentication header.
|
||||||
send a 401, logins will fail.
|
- When this setting is C(true), this module will immediately send a Basic authentication header on the first
|
||||||
|
request.
|
||||||
|
- "Use this setting in any of the following scenarios:"
|
||||||
|
- You know the webservice endpoint always requires HTTP Basic authentication, and you want to speed up your
|
||||||
|
requests by eliminating the first roundtrip.
|
||||||
|
- The web service does not properly send an HTTP 401 error to your client, so Ansible's HTTP library will not
|
||||||
|
properly respond with HTTP credentials, and logins will fail.
|
||||||
|
- The webservice bans or rate-limits clients that cause any HTTP 401 errors.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: no
|
||||||
follow_redirects:
|
follow_redirects:
|
||||||
|
|||||||
Reference in New Issue
Block a user