Module: Savon::SharedOptions

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

Overview

Options available in both GlobalOptions and LocalOptions. Currently covers WSSE authentication and timestamp headers.

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]



53
54
55
56
57
58
59
60
61
# File 'lib/savon/options.rb', line 53

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

#wsse_signature(signature) ⇒ Object



72
73
74
# File 'lib/savon/options.rb', line 72

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



68
69
70
# File 'lib/savon/options.rb', line 68

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