mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-12-09 00:01:48 -05:00
clean unused options, prefer using kwargs redirectionn for #aws_sdk_authentication instead
This commit is contained in:
parent
1724c0f913
commit
408e71a490
@ -3,9 +3,15 @@
|
|||||||
module HTTPX
|
module HTTPX
|
||||||
module Plugins
|
module Plugins
|
||||||
#
|
#
|
||||||
# This plugin adds helper methods to apply AWS Sigv4 to AWS cloud requests.
|
# This plugin applies AWS Sigv4 to requests, using the AWS SDK credentials and configuration.
|
||||||
|
#
|
||||||
|
# It requires the "aws-sdk-core" gem.
|
||||||
#
|
#
|
||||||
module AwsSdkAuthentication
|
module AwsSdkAuthentication
|
||||||
|
|
||||||
|
#
|
||||||
|
# encapsulates access to an AWS SDK credentials store.
|
||||||
|
#
|
||||||
class Credentials
|
class Credentials
|
||||||
def initialize(aws_credentials)
|
def initialize(aws_credentials)
|
||||||
@aws_credentials = aws_credentials
|
@aws_credentials = aws_credentials
|
||||||
@ -56,7 +62,7 @@ module HTTPX
|
|||||||
# aws_authentication(credentials: Aws::Credentials.new('akid', 'secret'))
|
# aws_authentication(credentials: Aws::Credentials.new('akid', 'secret'))
|
||||||
# aws_authentication()
|
# aws_authentication()
|
||||||
#
|
#
|
||||||
def aws_sdk_authentication(options = {})
|
def aws_sdk_authentication(**options)
|
||||||
credentials = AwsSdkAuthentication.credentials
|
credentials = AwsSdkAuthentication.credentials
|
||||||
region = AwsSdkAuthentication.region
|
region = AwsSdkAuthentication.region
|
||||||
|
|
||||||
|
|||||||
@ -148,8 +148,6 @@ module HTTPX
|
|||||||
Signer.new(signer)
|
Signer.new(signer)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def_option(:sigv4_password)
|
|
||||||
end.new.merge(options)
|
end.new.merge(options)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user