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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f318cd8434ed86ff9045ec0a2849774d2d4232f9b057ea70c2313f2255011ff6
4
- data.tar.gz: b587c4fee867ea15389db03d191c899061856fc8a53beea17bf7b88f0aa86cf3
3
+ metadata.gz: 96a404941f09e02fd096c7b7f62cd9ba80ee3a61058652e5b74961167d7d123c
4
+ data.tar.gz: 821c7372263973d516017ce7704a51a851cbb87a2259b9540c548b18aa506f30
5
5
  SHA512:
6
- metadata.gz: d92b432a32ee4a23c2209f66ab40eb6d2f56bb3fc9b7229da63eba8a105aacdfcfea36b21cb2739f879077e9f736e1b0ba3e5c4d0602b070cc388aaec684cefa
7
- data.tar.gz: 330b5cbc65fed482fc7af84368967ae3987047d6235f68b5f8fa1b8757c626dbfcde0f6bdde13d3f644666850f24be6cd9a793ffe6ea528ed78b35d9dc8cb933
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
- # puts request.headers.inspect
131
+ Rails.logger.info request.headers.inspect
132
132
  @current_user = nil
133
- # puts "Are there wbehooks headers to check for? #{Settings.ns(:security).allowed_authorization_headers}"
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
- # 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
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.11
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-01 00:00:00.000000000 Z
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