Class: Aws::Plugins::CSDConditionalSigning

Inherits:
Seahorse::Client::Plugin show all
Defined in:
aws-sdk-core/lib/aws-sdk-core/plugins/csd_conditional_signing.rb

Overview

Makes it possible to conditional sign CloudSearchDomain::Client requests. When credentials are configured, requests are signed. When they are omitted, the request is sent anonymously.

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Plugin

#add_handlers, #add_options, after_initialize, #before_initialize, before_initialize, option

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Instance Method Details

#after_initialize(client) ⇒ Object


28
29
30
31
32
33
# File 'aws-sdk-core/lib/aws-sdk-core/plugins/csd_conditional_signing.rb', line 28

def after_initialize(client)
  # disable request singing when credentials are not set
  if client.config.credentials.nil? or !client.config.credentials.set?
    client.config.signature_version = nil
  end
end