zuora_api_oauth_alpha 2.12 → 2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1f5fb3d1cba9978f4cf6c81adad579d3d845d68e51fa05f63b9606d75852790
|
4
|
+
data.tar.gz: 1eccb6424ee212122c69b45a427fc838644d14a4fbf221fcf1e309058d8c566e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 791e0d0ff28e55190337f352de052338c3da995f5d683c682381d8d3f3690ba472318b7c467600b5305d6cc9dd8047fe63c8a13be53acbdd50a4aeb253810bc3
|
7
|
+
data.tar.gz: 0ce1b4fba1a4de2b77511ad7f400f50792641b554d987d17328c917a08c7cb0e6543949d789a776be888a4e3e3cefccc37db7a7b3966e98c69529f67dd9bf21d
|
@@ -104,6 +104,7 @@ module ZuoraAPI
|
|
104
104
|
end
|
105
105
|
raise ZuoraAPI::Exceptions::ZuoraAPIAuthenticationTypeError.new(self.current_error) if self.status == 'AuthenticationError'
|
106
106
|
raise ZuoraAPI::Exceptions::ZuoraAPISessionError.new(self.current_error) if self.status != 'Active'
|
107
|
+
Rails.logger.debug("Repsonse to get_session: Authtype: #{auth_type} Prefix: #{prefix} session: #{self.current_session.to_s}")
|
107
108
|
return self.authentication_prefix(auth_type) + self.current_session.to_s if prefix
|
108
109
|
return self.current_session.to_s
|
109
110
|
end
|
@@ -412,7 +413,7 @@ module ZuoraAPI
|
|
412
413
|
rescue ZuoraAPI::Exceptions::ZuoraAPISessionError => ex
|
413
414
|
if !(tries -= 1).zero? && z_session
|
414
415
|
Rails.logger.debug {"Session Invalid"}
|
415
|
-
self.new_session(oauth_only ? :bearer : nil)
|
416
|
+
self.current_session = self.new_session(oauth_only ? :bearer : nil)
|
416
417
|
retry
|
417
418
|
else
|
418
419
|
if errors.include?(ex.class)
|
@@ -32,7 +32,6 @@ module ZuoraAPI
|
|
32
32
|
|
33
33
|
def new_session(auth_type = :basic)
|
34
34
|
auth_type ||= :basic
|
35
|
-
puts auth_type
|
36
35
|
Rails.logger.debug("Create new session")
|
37
36
|
raise ZuoraAPI::Exceptions::ZuoraAPIAuthenticationTypeError.new("Basic Login, does not support Authentication of Type: #{auth_type}") if auth_type != :basic
|
38
37
|
begin
|
@@ -119,19 +118,19 @@ module ZuoraAPI
|
|
119
118
|
else
|
120
119
|
#If Session only is used for Gem TODO Depercate
|
121
120
|
if (self.password.blank? && @z_session_token.present?)
|
122
|
-
|
121
|
+
self.z_session_token = @z_session_token
|
123
122
|
self.username = @output_xml.xpath('//ns1:Username', 'ns1' =>'http://api.zuora.com/').text if self.username.blank?
|
124
123
|
|
125
124
|
#Username & password combo
|
126
125
|
elsif (self.password.present? && self.username.present?)
|
127
126
|
retrieved_session = @output_xml.xpath('//ns1:Session', 'ns1' =>'http://api.zuora.com/').text
|
128
127
|
raise ZuoraAPI::Exceptions::ZuoraAPISessionError.new("No session found for api call.") if retrieved_session.blank?
|
129
|
-
|
128
|
+
self.z_session_token = retrieved_session
|
130
129
|
end
|
131
130
|
|
132
131
|
self.current_error = nil
|
133
132
|
self.status = 'Active'
|
134
|
-
return
|
133
|
+
return self.z_session_token
|
135
134
|
end
|
136
135
|
rescue Net::ReadTimeout, Net::OpenTimeout, Errno::EPIPE, Errno::ECONNRESET, Errno::ECONNREFUSED, SocketError => ex
|
137
136
|
if !(tries -= 1).zero?
|