thecore_backend_commons 3.1.4 → 3.1.6

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: 7497a63c6b2cf568f786b24734477b49d8a38a8b6dbec82f370ee1c02d463038
4
- data.tar.gz: 4659432eab9e8b37b37c7e412010f82d8ba0aba879eadffc1ab22d79bae33dc0
3
+ metadata.gz: 83b2f5c0eff5f1608ffe2ba3190cd68f5f42620560983abdea7766063a68311f
4
+ data.tar.gz: bcf1f5517c90726c0570597ddcc8571da335a896a4d67e06f89ac1f90fc5e04d
5
5
  SHA512:
6
- metadata.gz: 3da399e4ee0c80efb21447a3c50088a50e1a302531faf16d4f0fc8b0acc247b5f63968a738bc99dfd2b8b0f7ccca84f0242d0cdc2f365a9ae2d4d4c470910515
7
- data.tar.gz: da3e94fa7c2c17da98d4c2aeac681a9fb59362d49738a6f17fd486ccfaa759767073e2a4dd70843ea1de1e0b04d3983a0b3fd606e8b2099276b36a75ddd00425
6
+ metadata.gz: 2bf6a25d173c57e50a618b5609015ddfccf27ffad675d5c827a34150551c58c4c01ba6290783efc06a74a4d25a3b00d455b7bacc1ed614209f99e05cbfe03274
7
+ data.tar.gz: 704ff1a0f14ba3d9721f8bd257077b4450154404d95f2007a835049d63dbb7a64db1a16c3f256a8f72daa878c39795b6918b4350d5d708c8773ce6f121f25ec4
data/README.md CHANGED
@@ -1,28 +1 @@
1
- # ThecoreBackendCommons
2
- Short description and motivation.
3
-
4
- ## Usage
5
- How to use my plugin.
6
-
7
- ## Installation
8
- Add this line to your application's Gemfile:
9
-
10
- ```ruby
11
- gem "thecore_backend_commons"
12
- ```
13
-
14
- And then execute:
15
- ```bash
16
- $ bundle
17
- ```
18
-
19
- Or install it yourself as:
20
- ```bash
21
- $ gem install thecore_backend_commons
22
- ```
23
-
24
- ## Contributing
25
- Contribution directions go here.
26
-
27
- ## License
28
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
1
+ This is part of Thecore framework: https://github.com/gabrieletassoni/thecore/tree/release/3
@@ -11,8 +11,10 @@ module CableConnectionConcern
11
11
 
12
12
  protected
13
13
 
14
- def find_verified_user # this checks whether a user is authenticated with devise
15
- m = request.query_parameters["token"]
14
+ def find_verified_user
15
+ # this checks whether a user is authenticated with devise
16
+ # It looks for a token in the query parameters, or in the header
17
+ m = request.query_parameters["token"].presence || request.headers["Authorization"].split(" ").second.strip
16
18
 
17
19
  body = ::HashWithIndifferentAccess.new(::JWT.decode(m, ::Rails.application.credentials.dig(:secret_key_base).presence||ENV["SECRET_KEY_BASE"], false)[0]) rescue nil
18
20
  if verified_user = (env['warden'].user.presence || User.find_by(id: body[:user_id]))
@@ -1,3 +1,3 @@
1
1
  module ThecoreBackendCommons
2
- VERSION = "#{`git describe --tags $(git rev-list --tags --max-count=1)`.chomp}"
2
+ VERSION = "3.1.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_backend_commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.4
4
+ version: 3.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-05 00:00:00.000000000 Z
11
+ date: 2023-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thecore_auth_commons
@@ -188,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
188
  - !ruby/object:Gem::Version
189
189
  version: '0'
190
190
  requirements: []
191
- rubygems_version: 3.3.26
191
+ rubygems_version: 3.4.10
192
192
  signing_key:
193
193
  specification_version: 4
194
194
  summary: Thecore 3 foundations for the Web UI Backend.