mirror of
https://github.com/moparisthebest/curl
synced 2025-01-08 12:28:06 -05:00
docs: add AWS HTTP v4 Signature
This commit is contained in:
parent
6b27df8269
commit
e2b2afbeea
@ -236,6 +236,7 @@ DPAGES = \
|
||||
url.d use-ascii.d \
|
||||
user-agent.d \
|
||||
user.d verbose.d \
|
||||
aws-sigv4.d \
|
||||
version.d \
|
||||
write-out.d \
|
||||
xattr.d
|
||||
|
10
docs/cmdline-opts/aws-sigv4.d
Normal file
10
docs/cmdline-opts/aws-sigv4.d
Normal file
@ -0,0 +1,10 @@
|
||||
Long: aws-sigv4
|
||||
Arg: <provider1[:provider2]>
|
||||
Help: provides AWS V4 signature authentication
|
||||
Category: auth http
|
||||
Added: 7.75.0
|
||||
---
|
||||
provides AWS V4 signature authentication on HTTPS header:
|
||||
|
||||
The provider argument is a string that is used by the algorithm when creating
|
||||
outgoing authentication headers.
|
@ -423,6 +423,8 @@ RTSP Transport: header. See \fICURLOPT_RTSP_TRANSPORT(3)\fP
|
||||
Client CSEQ number. See \fICURLOPT_RTSP_CLIENT_CSEQ(3)\fP
|
||||
.IP CURLOPT_RTSP_SERVER_CSEQ
|
||||
CSEQ number for RTSP Server->Client request. See \fICURLOPT_RTSP_SERVER_CSEQ(3)\fP
|
||||
.IP CURLOPT_AWS_SIGV4
|
||||
AWS HTTP V4 Signature. See \fICURLOPT_AWS_SIGV4(3)\fP
|
||||
.SH PROTOCOL OPTIONS
|
||||
.IP CURLOPT_TRANSFERTEXT
|
||||
Use text transfer. See \fICURLOPT_TRANSFERTEXT(3)\fP
|
||||
|
82
docs/libcurl/opts/CURLOPT_AWS_SIGV4.3
Normal file
82
docs/libcurl/opts/CURLOPT_AWS_SIGV4.3
Normal file
@ -0,0 +1,82 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
.\" * copies of the Software, and permit persons to whom the Software is
|
||||
.\" * furnished to do so, under the terms of the COPYING file.
|
||||
.\" *
|
||||
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
.\" * KIND, either express or implied.
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLOPT_AWS_SIGV4 3 "03 Jun 2020" "libcurl 7.72.0" "curl_easy_setopt options"
|
||||
.SH NAME
|
||||
CURLOPT_AWS_SIGV4 \- V4 signature
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_AWS_SIGV4,
|
||||
char *providers_infos);
|
||||
.SH DESCRIPTION
|
||||
provides AWS V4 signature authentication on HTTPS header
|
||||
|
||||
The provider argument is a string that is merged to some authentication
|
||||
parameters use by the algorithm.
|
||||
It's used by "Algorithm", "date", "request type", "signed headers" arguments,
|
||||
|
||||
NOTE: This call set CURLOPT_HTTPAUTH to CURLAUTH_AWS_SIGV4.
|
||||
Calling CURLOPT_HTTPAUTH with CURLAUTH_AWS_SIGV4 is the same as calling
|
||||
this with "aws:amz" in paramater.
|
||||
|
||||
Example with "Test:Try", when curl will do the algorithm, it will Generate:
|
||||
"TEST-HMAC-SHA256" for "Algorithm"
|
||||
"x-try-date" and "X-Try-Date" for "date"
|
||||
"test4_request" for "request type"
|
||||
"SignedHeaders=content-type;host;x-try-date" for "signed headers"
|
||||
|
||||
If you use just "test", instead of "test:try",
|
||||
test will be use for every strings generated
|
||||
|
||||
.SH DEFAULT
|
||||
NULL
|
||||
.SH PROTOCOLS
|
||||
HTTP
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
CURL *curl = curl_easy_init();
|
||||
|
||||
struct curl_slist *list = NULL;
|
||||
|
||||
if(curl) {
|
||||
curl_easy_setopt(curl, CURLOPT_URL,
|
||||
"https://api_type.region.example.com/uri");
|
||||
|
||||
curl_easy_setopt(c, CURLOPT_AWS_SIGV4, "xxx:yyy");
|
||||
curl_easy_setopt(c, CURLOPT_USERPWD, "MY_ACCESS_KEY:MY_SECRET_KEY");
|
||||
curl_easy_perform(curl);
|
||||
}
|
||||
.fi
|
||||
|
||||
.SH AVAILABILITY
|
||||
Added in 7.75.0
|
||||
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
|
||||
.SH NOTES
|
||||
this option overrides the other auth types you might have set in CURL_HTTPAUTH which should be highlighted as this makes this auth method special. It could probably also be mentioned that this method can't be combined with other auth types.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLOPT_HEADEROPT "(3), " CURLOPT_HTTPHEADER "(3), "
|
@ -98,6 +98,9 @@ it finds most secure.
|
||||
This is a meta symbol. OR this value together with a single specific auth
|
||||
value to force libcurl to probe for un-restricted auth and if not, only that
|
||||
single auth algorithm is acceptable.
|
||||
.IP CURLAUTH_AWS_SIGV4
|
||||
provides AWS V4 signature authentication on HTTPS header
|
||||
see \fICURLOPT_AWS_SIGV4(3)\fP.
|
||||
.SH DEFAULT
|
||||
CURLAUTH_BASIC
|
||||
.SH PROTOCOLS
|
||||
@ -124,6 +127,8 @@ CURLAUTH_ONLY was added in 7.21.3
|
||||
CURLAUTH_NTLM_WB was added in 7.22.0
|
||||
|
||||
CURLAUTH_BEARER was added in 7.61.0
|
||||
|
||||
CURLAUTH_AWS_SIGV4 was added in 7.74.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
|
||||
CURLE_NOT_BUILT_IN if the bitmask specified no supported authentication
|
||||
|
@ -382,6 +382,7 @@ man_MANS = \
|
||||
CURLOPT_USERNAME.3 \
|
||||
CURLOPT_USERPWD.3 \
|
||||
CURLOPT_USE_SSL.3 \
|
||||
CURLOPT_AWS_SIGV4.3 \
|
||||
CURLOPT_VERBOSE.3 \
|
||||
CURLOPT_WILDCARDMATCH.3 \
|
||||
CURLOPT_WRITEDATA.3 \
|
||||
|
@ -14,6 +14,7 @@
|
||||
--alt-svc 7.64.1
|
||||
--anyauth 7.10.6
|
||||
--append (-a) 4.8
|
||||
--aws-sigv4 7.75.0
|
||||
--basic 7.10.6
|
||||
--cacert 7.5
|
||||
--capath 7.9.8
|
||||
|
Loading…
Reference in New Issue
Block a user