Class: Soteria::Utilities
- Inherits:
-
Object
- Object
- Soteria::Utilities
- Defined in:
- lib/soteria/utilities.rb
Constant Summary collapse
- CREDENTIAL_TYPES =
{ standard: 'STANDARD_OTP', certificate: 'CERTIFICATE', sms: 'SMS_OTP', voice: 'VOICE_OTP', service: 'SERVICE_OTP' }
Class Method Summary collapse
-
.create_client(wsdl, should_log, cert_file, cert_key, cert_key_password) ⇒ Object
Create a Savon client object to make calls.
-
.get_request_id(prefix) ⇒ String
Generate a request ID for a SOAP call.
Class Method Details
.create_client(wsdl, should_log, cert_file, cert_key, cert_key_password) ⇒ Object
Create a Savon client object to make calls.
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/soteria/utilities.rb', line 24 def self.create_client(wsdl, should_log, cert_file, cert_key, cert_key_password) Savon.client(wsdl: wsdl, env_namespace: :soapenv, namespace: 'https://schemas.symantec.com/vip/2011/04/vipuserservices', log: should_log, ssl_version: :TLSv1, ssl_cert_file: cert_file, ssl_cert_key_file: cert_key, ssl_cert_key_password: cert_key_password, namespace_identifier: :vip) end |
.get_request_id(prefix) ⇒ String
Generate a request ID for a SOAP call.
10 11 12 13 |
# File 'lib/soteria/utilities.rb', line 10 def self.get_request_id(prefix) time = Time.new prefix + '_' + time.strftime('%Y%m%d%H%M%S') end |