xref: /aosp_15_r20/external/curl/docs/cmdline-opts/anyauth.md (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker---
2*6236dae4SAndroid Build Coastguard Workerc: Copyright (C) Daniel Stenberg, <[email protected]>, et al.
3*6236dae4SAndroid Build Coastguard WorkerSPDX-License-Identifier: curl
4*6236dae4SAndroid Build Coastguard WorkerLong: anyauth
5*6236dae4SAndroid Build Coastguard WorkerHelp: Pick any authentication method
6*6236dae4SAndroid Build Coastguard WorkerProtocols: HTTP
7*6236dae4SAndroid Build Coastguard WorkerCategory: http proxy auth
8*6236dae4SAndroid Build Coastguard WorkerAdded: 7.10.6
9*6236dae4SAndroid Build Coastguard WorkerMulti: mutex
10*6236dae4SAndroid Build Coastguard WorkerSee-also:
11*6236dae4SAndroid Build Coastguard Worker  - proxy-anyauth
12*6236dae4SAndroid Build Coastguard Worker  - basic
13*6236dae4SAndroid Build Coastguard Worker  - digest
14*6236dae4SAndroid Build Coastguard WorkerExample:
15*6236dae4SAndroid Build Coastguard Worker  - --anyauth --user me:pwd $URL
16*6236dae4SAndroid Build Coastguard Worker---
17*6236dae4SAndroid Build Coastguard Worker
18*6236dae4SAndroid Build Coastguard Worker# `--anyauth`
19*6236dae4SAndroid Build Coastguard Worker
20*6236dae4SAndroid Build Coastguard WorkerFigure out authentication method automatically, and use the most secure one
21*6236dae4SAndroid Build Coastguard Workerthe remote site claims to support. This is done by first doing a request and
22*6236dae4SAndroid Build Coastguard Workerchecking the response-headers, thus possibly inducing an extra network
23*6236dae4SAndroid Build Coastguard Workerround-trip. This option is used instead of setting a specific authentication
24*6236dae4SAndroid Build Coastguard Workermethod, which you can do with --basic, --digest, --ntlm, and --negotiate.
25*6236dae4SAndroid Build Coastguard Worker
26*6236dae4SAndroid Build Coastguard WorkerUsing --anyauth is not recommended if you do uploads from stdin, since it may
27*6236dae4SAndroid Build Coastguard Workerrequire data to be sent twice and then the client must be able to rewind. If
28*6236dae4SAndroid Build Coastguard Workerthe need should arise when uploading from stdin, the upload operation fails.
29*6236dae4SAndroid Build Coastguard Worker
30*6236dae4SAndroid Build Coastguard WorkerUsed together with --user.
31