# File lib/aws-sdk-core/plugins/request_signer.rb, line 82 def call(context) sign_authenticated_requests(context) unless unsigned_request?(context) @handler.call(context) end
# File lib/aws-sdk-core/plugins/request_signer.rb, line 104 def missing_credentials?(context) context.config.credentials.nil? or !context.config.credentials.set? end
# File lib/aws-sdk-core/plugins/request_signer.rb, line 97 def require_credentials(context) if missing_credentials?(context) msg = 'unable to sign request without credentials set' raise Errors::MissingCredentialsError, msg end end
# File lib/aws-sdk-core/plugins/request_signer.rb, line 89 def sign_authenticated_requests(context) require_credentials(context) if signer = SIGNERS[context.config.signature_version] require_credentials(context) signer.sign(context) end end
# File lib/aws-sdk-core/plugins/request_signer.rb, line 109 def unsigned_request?(context) if context.config.api.metadata['endpointPrefix'] == 'sts' STS_UNSIGNED_REQUESTS.include?(context.operation.name) elsif context.config.api.metadata['endpointPrefix'] == 'cloudsearchdomain' context.config.credentials.nil? || !context.config.credentials.set? elsif context.config.api.metadata['endpointPrefix'] == 'cognito-identity' COGNITO_IDENTITY_UNSIGNED_REQUESTS.include?(context.operation.name) else false end end