zuora_connect 1.5.23 → 1.5.24
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 +4 -4
- data/lib/zuora_connect/controllers/helpers.rb +5 -2
- data/lib/zuora_connect/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 873531c1e1a0ae9a98c9f2672ac90aa0a7cd561d
|
|
4
|
+
data.tar.gz: 1da07b0be89e1888411ab3011c90cb94a0467487
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b10f5dbd90b63fdc703fa19e993f84f6ca2d715543cd0028851b6c4e2dfb0db9e01b43159900aec541ca7620c9954fc6097b85a7a7c4f3ea19182080027ea5e8
|
|
7
|
+
data.tar.gz: 207b2491c88663a3159df8bbb2c07034b95ec80fcabec90a545e11b11b390155191d5b33c46257662ccf9dda6358a16c59de3b9e5058d15e6dd326968fc5f6a6
|
|
@@ -25,6 +25,7 @@ module ZuoraConnect
|
|
|
25
25
|
|
|
26
26
|
def authenticate_connect_app_request
|
|
27
27
|
start_time = Time.now
|
|
28
|
+
|
|
28
29
|
if ZuoraConnect.configuration.mode == "Production"
|
|
29
30
|
if request["data"]
|
|
30
31
|
setup_instance_via_data
|
|
@@ -36,7 +37,9 @@ module ZuoraConnect
|
|
|
36
37
|
end
|
|
37
38
|
#Call .data_lookup with the current session to retrieve session. In some cases session may be stored/cache in redis
|
|
38
39
|
#so data lookup provides a model method that can be overriden per app.
|
|
39
|
-
|
|
40
|
+
if params[:controller] != 'zuora_connect/api/v1/app_instance' && params[:action] != 'drop'
|
|
41
|
+
@appinstance.new_session(:session => @appinstance.data_lookup(:session => session))
|
|
42
|
+
end
|
|
40
43
|
PaperTrail.whodunnit = session["#{@appinstance.id}::user::email"] if defined?(PaperTrail) && session["#{@appinstance.id}::user::email"].present?
|
|
41
44
|
begin
|
|
42
45
|
I18n.locale = session["#{@appinstance.id}::user::locale"] ? session["#{@appinstance.id}::user::locale"] : @appinstance.locale
|
|
@@ -95,7 +98,7 @@ module ZuoraConnect
|
|
|
95
98
|
@appinstance = ZuoraConnect::AppInstance.new(:api_token => values[:api_token],:id => values["appInstance"].to_i, :access_token => values["access_token"].blank? ? values["user"] : values["access_token"], :token => values["refresh_token"] , :refresh_token => values["refresh_token"].blank? ? values["key"] : values["refresh_token"], :oauth_expires_at => values["expires"])
|
|
96
99
|
@appinstance.save(:validate => false)
|
|
97
100
|
end
|
|
98
|
-
Rails.logger.debug("[#{@appinstance.id}] App Params: #{values.
|
|
101
|
+
Rails.logger.debug("[#{@appinstance.id}] App Params: #{values.to_json}}") if Rails.env != "production"
|
|
99
102
|
@appinstance.access_token = values["access_token"] if !values["access_token"].blank? && @appinstance.access_token != values["access_token"]
|
|
100
103
|
@appinstance.refresh_token = values["refresh_token"] if !values["refresh_token"].blank? && @appinstance.refresh_token != values["refresh_token"]
|
|
101
104
|
@appinstance.oauth_expires_at = values["expires"] if !values["expires"].blank?
|