thecore_backend_commons 3.1.5 → 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: 97741971ca6bd986ce48c1237ce588165731d323c11aa445db719d54bfc456b8
4
- data.tar.gz: f2ca229b0010a509c2f1519588625f4a5873f7f949a732c701fe91a156667628
3
+ metadata.gz: 83b2f5c0eff5f1608ffe2ba3190cd68f5f42620560983abdea7766063a68311f
4
+ data.tar.gz: bcf1f5517c90726c0570597ddcc8571da335a896a4d67e06f89ac1f90fc5e04d
5
5
  SHA512:
6
- metadata.gz: 4a3e601c21af2052e7c5399a8a3ce07c20e4e1b02b3163a81f91aa92c196288a619627e13ac9d4b2a1762283472e78fa1ae7334e168dae12eb3360e7d7b0a94d
7
- data.tar.gz: '0709885ccaf4e4347f314e6599ca42f8da0ad982e9bb229c3d44dae3d4d29bc066ec4a3f4f190ce4c965e9906fbc93a0acf6d6dee95b37059edd57368e0c354f'
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 = "3.1.5"
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.5
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-06-13 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