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 +4 -4
- data/README.md +1 -28
- data/config/initializers/concern_cable_connection.rb +4 -2
- data/lib/thecore_backend_commons/version.rb +1 -1
- 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: 83b2f5c0eff5f1608ffe2ba3190cd68f5f42620560983abdea7766063a68311f
|
4
|
+
data.tar.gz: bcf1f5517c90726c0570597ddcc8571da335a896a4d67e06f89ac1f90fc5e04d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bf6a25d173c57e50a618b5609015ddfccf27ffad675d5c827a34150551c58c4c01ba6290783efc06a74a4d25a3b00d455b7bacc1ed614209f99e05cbfe03274
|
7
|
+
data.tar.gz: 704ff1a0f14ba3d9721f8bd257077b4450154404d95f2007a835049d63dbb7a64db1a16c3f256a8f72daa878c39795b6918b4350d5d708c8773ce6f121f25ec4
|
data/README.md
CHANGED
@@ -1,28 +1 @@
|
|
1
|
-
|
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
|
15
|
-
|
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]))
|
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
|
+
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-
|
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
|