Module: Savon::SharedOptions

Included in:
GlobalOptions, LocalOptions
Defined in:
lib/savon/options.rb

Instance Method Summary collapse

Instance Method Details

#wsse_auth(*credentials) ⇒ Object

WSSE auth credentials for Akami. Local will override the global wsse_auth value, e.g.

global == [user, pass] && local == [user2, pass2] => [user2, pass2]
global == [user, pass] && local == false => false
global == [user, pass] && local == nil   => [user, pass]


47
48
49
50
51
52
53
54
# File 'lib/savon/options.rb', line 47

def wsse_auth(*credentials)
  credentials.flatten!
  if credentials.size == 1
    @options[:wsse_auth] = credentials.first
  else
    @options[:wsse_auth] = credentials
  end
end

#wsse_signature(signature) ⇒ Object



65
66
67
# File 'lib/savon/options.rb', line 65

def wsse_signature(signature)
  @options[:wsse_signature] = signature
end

#wsse_timestamp(timestamp = true) ⇒ Object

Instruct Akami to enable wsu:Timestamp headers. Local will override the global wsse_timestamp value, e.g.

global == true && local == true  => true
global == true && local == false => false
global == true && local == nil   => true


61
62
63
# File 'lib/savon/options.rb', line 61

def wsse_timestamp(timestamp = true)
  @options[:wsse_timestamp] = timestamp
end