Remove deprecation warnings due to usage of utcnow and utcfromtimestamp. Thanks to Raphael Krupinski.
httpx_auth.AWS4Auth.default_include_headers value kept growing in size every time a new httpx_auth.AWS4Auth instance was created with security_token parameter provided. Thanks to Miikka Koskinen.
httpx_auth.AWS4Auth is now based almost entirely on AWS documentation, diverging from the original implementation based on requests-aws4auth and solving implementation issues in the process.
As the AWS documentation might be wrong or not exhaustive enough, feel free to open issues, should you encounter edge cases.
Changed
httpx_auth.AWS4Auth.default_include_headers is not available anymore, use httpx_auth.AWS4Authinclude_headers parameter instead to include additional headers if the default does not fit your need (refer to documentation for an exhaustive list).
httpx_auth.AWS4Authinclude_headers values will not be stripped anymore, meaning that you can now include headers prefixed and/or suffixed with blank spaces.
httpx_auth.AWS4Auth does not includes date header by default anymore. You will have to provide it via include_headers yourself if you need to.
Note that it should not be required as httpx_auth.AWS4Auth is sending x-amz-date by default and AWS documentation states that the request date can be specified by using either the HTTP Date or the x-amz-date header. If both headers are present, x-amz-date takes precedence.
httpx_auth.AWS4Authinclude_headers does not needs to include host, content-type or x-amz-* anymore as those headers will always be included. It is now expected to be provided as a list of additional headers.
httpx_auth.AWS4Auth will not modify the headers values spaces when computing the canonical headers, only trim leading and trailing whitespaces as per AWS documentation.
Fixed
utcnow
andutcfromtimestamp
. Thanks toRaphael Krupinski
.httpx_auth.AWS4Auth.default_include_headers
value kept growing in size every time a newhttpx_auth.AWS4Auth
instance was created withsecurity_token
parameter provided. Thanks toMiikka Koskinen
.httpx_auth.AWS4Auth
is now based almost entirely on AWS documentation, diverging from the original implementation based onrequests-aws4auth
and solving implementation issues in the process.Changed
httpx_auth.AWS4Auth.default_include_headers
is not available anymore, usehttpx_auth.AWS4Auth
include_headers
parameter instead to include additional headers if the default does not fit your need (refer to documentation for an exhaustive list).httpx_auth.AWS4Auth
include_headers
values will not be stripped anymore, meaning that you can now include headers prefixed and/or suffixed with blank spaces.httpx_auth.AWS4Auth
does not includesdate
header by default anymore. You will have to provide it viainclude_headers
yourself if you need to.httpx_auth.AWS4Auth
is sendingx-amz-date
by default and AWS documentation states that the request date can be specified by using either the HTTPDate
or thex-amz-date
header. If both headers are present,x-amz-date
takes precedence.httpx_auth.AWS4Auth
include_headers
does not needs to includehost
,content-type
orx-amz-*
anymore as those headers will always be included. It is now expected to be provided as a list of additional headers.httpx_auth.AWS4Auth
will not modify the headers values spaces when computing the canonical headers, only trim leading and trailing whitespaces as per AWS documentation.