forest_liana 3.0.0.pre.beta.14 → 3.0.0.pre.beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94f79f5df9cdac1a5b97d2f04c76d48a8a116e1a
|
4
|
+
data.tar.gz: f47790fdddff55d8d02e433ea17e462b073564f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b0913455deaf13fa8573e6447fdd99481b9ce9dc510d208a70aed5b54e5ca71fd7794b2b8803873f3b882f750430ffc3e6a4eee3c65ef08bebea3b25b16a0cb
|
7
|
+
data.tar.gz: 2afc4b23ee3a03f932db9231e38f5e7704759ade5632d0b87908c9d0120bf1eab73cdf2b6bea34c286d652f53b5840ded7863e351f50388ec0971dd1177a5590
|
@@ -3,6 +3,8 @@ require 'csv'
|
|
3
3
|
|
4
4
|
module ForestLiana
|
5
5
|
class ApplicationController < ForestLiana::BaseController
|
6
|
+
REGEX_COOKIE_SESSION_TOKEN = /sessionToken=(.*);?/;
|
7
|
+
|
6
8
|
def self.papertrail?
|
7
9
|
Object.const_get('PaperTrail::Version').is_a?(Class) rescue false
|
8
10
|
end
|
@@ -56,11 +58,13 @@ module ForestLiana
|
|
56
58
|
|
57
59
|
def authenticate_user_from_jwt
|
58
60
|
begin
|
59
|
-
if request.headers
|
61
|
+
if request.headers
|
60
62
|
if request.headers['Authorization']
|
61
63
|
token = request.headers['Authorization'].split.second
|
62
|
-
|
63
|
-
|
64
|
+
# NOTICE: Necessary for downloads authentication.
|
65
|
+
elsif request.headers['cookie']
|
66
|
+
match = REGEX_COOKIE_SESSION_TOKEN.match(request.headers['cookie'])
|
67
|
+
token = match[1] if match && match[1]
|
64
68
|
end
|
65
69
|
|
66
70
|
@jwt_decoded_token = JWT.decode(token, ForestLiana.auth_secret, true,
|
data/lib/forest_liana/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forest_liana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.pre.beta.
|
4
|
+
version: 3.0.0.pre.beta.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sandro Munda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|