Sha256: 5f57304ffa301baf6a551d161c719e7cb48fcac17bafe3bc45da48d7e1308039

Contents?: true

Size: 593 Bytes

Versions: 4

Compression:

Stored size: 593 Bytes

Contents

# Idea taken from:  http://blog.willcannings.com/2008/07/06/wsse-authentication-in-ruby-soap4r/
# See also: http://journal.dedasys.com/2009/05/08/ruby-soap4r-wsse-authentication

require 'soap/header/simplehandler'

class G4SIAuthHeader < CustomHeader
  
  NAMESPACE  = 'http://WS.G4SI.COM/'

  def initialize(username, password, accessKey)
    @username, @password, @accessKey = username, password, accessKey
    super(XSD::QName.new(NAMESPACE, 'G4SIAuthentication'))
  end

  def on_simple_outbound
    {"Username" => @username, "Password" => @password, "AccessKey"=>@accessKey}
  end


end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
g4s_client-0.2.1 lib/g4s/headers/g4si_auth_header.rb
g4s_client-0.2.0 lib/g4s/headers/g4si_auth_header.rb
g4s_client-0.1.7 lib/g4s/headers/g4si_auth_header.rb
g4s_client-0.1.6 lib/g4s/headers/g4si_auth_header.rb