model_driven_api 2.3.11 → 2.3.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/api/v2/application_controller.rb +5 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96a404941f09e02fd096c7b7f62cd9ba80ee3a61058652e5b74961167d7d123c
|
4
|
+
data.tar.gz: 821c7372263973d516017ce7704a51a851cbb87a2259b9540c548b18aa506f30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9ce5471c94e2de11172bafcd047ce527840eb950eaef9281d9030542bcdc3ac7149edd81b366f38e6b8c7abe2214b4169f89c1412134d4f89e68a8f977db93c
|
7
|
+
data.tar.gz: 68756bc2801c58b653e12cbd6b02a0cb5379b5c6471246f371d56f8cae0c40eb41172b1c410819c2562507d80d2e8a76c03b56e7e8dc0f7d8f519bebd329fced
|
@@ -128,18 +128,20 @@ class Api::V2::ApplicationController < ActionController::API
|
|
128
128
|
end
|
129
129
|
|
130
130
|
def authenticate_request
|
131
|
-
|
131
|
+
Rails.logger.info request.headers.inspect
|
132
132
|
@current_user = nil
|
133
|
-
|
133
|
+
Rails.logger.info "Are there webhooks headers to check for? #{Settings.ns(:security).allowed_authorization_headers}"
|
134
134
|
Settings.ns(:security).allowed_authorization_headers.split(",").each do |header|
|
135
135
|
# puts "Found header #{header}: #{request.headers[header.underscore.dasherize]}"
|
136
136
|
check_authorization("Authorize#{header}".constantize.call(request.headers, request.raw_post)) if request.headers[header.underscore.dasherize]
|
137
137
|
end
|
138
138
|
|
139
|
-
|
139
|
+
Rails.logger.info "This is the default one, if the header doesn't have a valid form for one of the other Auth methods, then use this Auth Class"
|
140
140
|
check_authorization AuthorizeApiRequest.call(request.headers) unless @current_user
|
141
|
+
Rails.logger.info "Inspect @current_user: #{@current_user} if nil, then returns unauthenticated"
|
141
142
|
return unauthenticated!(OpenStruct.new({message: @auth_errors})) unless @current_user
|
142
143
|
|
144
|
+
Rails.logger.info "We are here, so the user authenticated"
|
143
145
|
current_user = @current_user
|
144
146
|
params[:current_user_id] = @current_user.id
|
145
147
|
# Now every time the user fires off a successful GET request,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: model_driven_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriele Tassoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore_backend_commons
|