Class: Docusign::AuthHeaderHandler

Inherits:
SOAP::Header::SimpleHandler
  • Object
show all
Defined in:
lib/docusign/auth_header_handler.rb

Constant Summary collapse

NAMESPACE =
'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user_name, password) ⇒ AuthHeaderHandler

Returns a new instance of AuthHeaderHandler.



9
10
11
12
13
14
# File 'lib/docusign/auth_header_handler.rb', line 9

def initialize(user_name, password)
  self.user_name = user_name
  self.password  = password
  
  super(XSD::QName.new(NAMESPACE, 'Security'))
end

Instance Attribute Details

#passwordObject

Returns the value of attribute password.



7
8
9
# File 'lib/docusign/auth_header_handler.rb', line 7

def password
  @password
end

#user_nameObject

Returns the value of attribute user_name.



7
8
9
# File 'lib/docusign/auth_header_handler.rb', line 7

def user_name
  @user_name
end

Instance Method Details

#on_simple_outboundObject



16
17
18
# File 'lib/docusign/auth_header_handler.rb', line 16

def on_simple_outbound
  {"UsernameToken" => {"Username" => user_name, "Password" => password}}
end