zuora_connect 2.0.3a → 2.0.3b
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zuora_connect/controllers/helpers.rb +10 -4
- data/lib/zuora_connect/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e56e17bd87c7bbf5beaa8318e85a513cf2fb5c53621db8060d9efe4d952f874
|
4
|
+
data.tar.gz: eb2a66325c1f9eea734f460ef2ea3a9c6913913f0212257226e3da7fbcf41024
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d37eac2b191533eb5c921414475bfd7e0be8adfd70bce67a298c09c5ee419dc899b0f7c03cd76c83e6dfd985215fd62a7dd3abafa96d1859098e04dccc0a7ed0
|
7
|
+
data.tar.gz: db6f16c7470884a1a067c4755b9a1517c7db2757f7f42d8fe5d17bbf8d89a90b3bfc6b1743a9cfa8af246f962274cdcab0bd534f1e9ff92262923a3ce87f0ce0
|
@@ -43,15 +43,15 @@ module ZuoraConnect
|
|
43
43
|
@appinstance = appinstances.first
|
44
44
|
end
|
45
45
|
|
46
|
-
|
46
|
+
else #if request.headers.fetch("Authorization", "").include?("Basic ")
|
47
47
|
authenticate_or_request_with_http_basic do |username, password|
|
48
48
|
@appinstance = ZuoraConnect::AppInstance.where(:token => password).first
|
49
49
|
@appinstance ||= ZuoraConnect::AppInstance.where(:api_token => password).first
|
50
50
|
ZuoraConnect.logger.debug("[#{@appinstance.id}] API REQUEST - Basic Auth") if @appinstance.present?
|
51
51
|
check_instance
|
52
52
|
end
|
53
|
-
else
|
54
|
-
|
53
|
+
# else
|
54
|
+
# check_instance
|
55
55
|
end
|
56
56
|
|
57
57
|
if @appinstance.present?
|
@@ -105,6 +105,12 @@ module ZuoraConnect
|
|
105
105
|
def authenticate_connect_app_request
|
106
106
|
ElasticAPM.set_tag(:trace_id, request.uuid) if defined?(ElasticAPM) && ElasticAPM.running?
|
107
107
|
Thread.current[:appinstance] = nil
|
108
|
+
|
109
|
+
if session["Identity"].blank? && request.headers['Zuora-Auth-Token'].present?
|
110
|
+
puts request.headers['ZuoraCurrentEntity']
|
111
|
+
puts "--------\n\n\n\n\n\n\n\n\n\n\n\n"
|
112
|
+
end
|
113
|
+
|
108
114
|
if params[:app_instance_ids].present? && !params[:app_instance_id].present?
|
109
115
|
begin
|
110
116
|
app_instance_ids = JSON.parse(Base64.urlsafe_decode64(params[:app_instance_ids]))
|
@@ -285,7 +291,7 @@ module ZuoraConnect
|
|
285
291
|
else
|
286
292
|
response.set_header('WWW-Authenticate', "Basic realm=\"Application\"")
|
287
293
|
#render json: {"status": 401, "message": "Access Denied"}, status: :unauthorized
|
288
|
-
render
|
294
|
+
render html: "HTTP Basic: Access denied.\n", status: :unauthorized
|
289
295
|
end
|
290
296
|
end
|
291
297
|
end
|