nm-gigya 0.1.23 → 0.1.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gigya/controller_utils.rb +21 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54da79569c7861797f22204107d2cc001dbb777df250f622123fcb21edf3310a
|
4
|
+
data.tar.gz: 55602a7160d4189029e993d82d9c1bbaeeda100f2ba26c28bc78652801ac5dbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac671574e315d01ce33a9d08c92eff30af86bba8b98a2dd0f90936ac990717107617ef39a858fade4e4b7da13cea2305c1909bba5ca12b167dd0506a4aa9be0d
|
7
|
+
data.tar.gz: e7d9027175d69dca62093a65a91b21f494be4be4216db6dc7a3feb4864db36114059ee2b6e23e9b0656afe35d706d62f51c99f7b40de0439fd362395900a71de
|
@@ -23,10 +23,30 @@ module Gigya
|
|
23
23
|
@@gigya_refresh_time_decay
|
24
24
|
end
|
25
25
|
|
26
|
+
@@max_logged_tokens = 20
|
27
|
+
@@logged_tokens = {}
|
28
|
+
|
29
|
+
def log_token_error(tok, msg = nil)
|
30
|
+
if @@max_logged_tokens > 0
|
31
|
+
if @logged_tokens[tok]
|
32
|
+
# already logged
|
33
|
+
else
|
34
|
+
@@logged_tokens[tok] = true
|
35
|
+
@@max_logged_tokens = @@max_logged_tokens - 1
|
36
|
+
end
|
37
|
+
Rails.logger.warn("Token Issue: #{tok}") if tok.present?
|
38
|
+
Rails.logger.warn("Token message: #{msg}") if msg.present?
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
26
42
|
def gigya_user_required
|
27
43
|
begin
|
28
|
-
|
44
|
+
if gigya_user_identifier.blank?
|
45
|
+
log_token_error(request.headers["Authorization"])
|
46
|
+
render(:json => {:error => "Invalid login"}, :status => 401)
|
47
|
+
end
|
29
48
|
rescue
|
49
|
+
log_token_error(request.headers["Authorization"], $!.message)
|
30
50
|
render(:json => {:error => "#{$!.message}"}, :status => 401)
|
31
51
|
end
|
32
52
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nm-gigya
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Bartlett
|
8
8
|
- Tyler Jackson
|
9
9
|
- Clark Ritchie
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
date: 2020-04-22 00:00:00.000000000 Z
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '2.1'
|
43
|
-
description:
|
43
|
+
description:
|
44
44
|
email: jonathan.bartlett@specialized.com
|
45
45
|
executables: []
|
46
46
|
extensions: []
|
@@ -56,7 +56,7 @@ homepage: http://www.newmedio.com/
|
|
56
56
|
licenses:
|
57
57
|
- MIT
|
58
58
|
metadata: {}
|
59
|
-
post_install_message:
|
59
|
+
post_install_message:
|
60
60
|
rdoc_options: []
|
61
61
|
require_paths:
|
62
62
|
- lib
|
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
72
|
version: '0'
|
73
73
|
requirements: []
|
74
74
|
rubygems_version: 3.1.2
|
75
|
-
signing_key:
|
75
|
+
signing_key:
|
76
76
|
specification_version: 4
|
77
77
|
summary: Gigya API Utility Package
|
78
78
|
test_files: []
|