Class: Docusign::Base
- Inherits:
-
Object
- Object
- Docusign::Base
- Defined in:
- lib/docusign/base.rb
Class Method Summary collapse
- .configure_ssl(connection) ⇒ Object
- .credentials(email, password, endpoint_url = nil) ⇒ Object
- .login(options = {}) ⇒ Object
Class Method Details
.configure_ssl(connection) ⇒ Object
57 58 59 60 61 |
# File 'lib/docusign/base.rb', line 57 def configure_ssl(connection) connection.["protocol.http.ssl_config.verify_mode"] = Docusign::Config[:verify_mode] if Docusign::Config[:verify_mode] connection.["protocol.http.ssl_config.ca_file"] = Docusign::Config[:ca_file] if Docusign::Config[:ca_file] connection end |
.credentials(email, password, endpoint_url = nil) ⇒ Object
47 48 49 50 51 52 53 54 55 |
# File 'lib/docusign/base.rb', line 47 def credentials(email, password, endpoint_url=nil) connection = Docusign::Credential::CredentialSoap.new connection = configure_ssl(connection) connection.endpoint_url = endpoint_url if endpoint_url connection.login(:email => email, :password => password).loginResult end |
.login(options = {}) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/docusign/base.rb', line 20 def login(={}) connection = Docusign::APIServiceSoap.new connection = configure_ssl(connection) if [:integrators_key] header = IntegratorsKeyAuthHeaderHandler.new( :email => .delete(:email), :integrators_key => .delete(:integrators_key), :password => .delete(:password) ) else header = AuthHeaderHandler.new( :user_name => .delete(:user_name), :password => .delete(:password) ) end connection.headerhandler << header .each do |key, value| connection.send("#{key}=", value) end connection end |