nm-gigya 0.1.4 → 0.1.5
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 +4 -4
- data/lib/gigya/connection.rb +3 -2
- data/lib/gigya/user.rb +10 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4fcc3079f011c2bc7f89f096c5cbb4396fd64c07
|
|
4
|
+
data.tar.gz: 7d91e181820f5e382fe48acf76eb7bf68e6a3ab9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ff759dd6c05e0101ba0b68931d2f4c9ced35b54e1362e6d830445c67a418fad72d40ae8eb5ffb92c958b08052e52773a0360219681e33439fcac13eba3138295
|
|
7
|
+
data.tar.gz: 74a89c4aba86b37f741094adf3bb1cdfb3bbd6993ccb9f4e35a5b854385a40c7f1b5bc4cc56b36e73357daa1337acfdba445c16d09ec4c0a3990b819b72a9700
|
data/lib/gigya/connection.rb
CHANGED
|
@@ -161,7 +161,8 @@ module Gigya
|
|
|
161
161
|
:datacenter => ENV["GIGYA_DATACENTER"] || "us1",
|
|
162
162
|
:api_key => ENV["GIGYA_API_KEY"],
|
|
163
163
|
:user_key => ENV["GIGYA_USER_KEY"],
|
|
164
|
-
:user_secret => ENV["GIGYA_USER_SECRET"]
|
|
164
|
+
:user_secret => ENV["GIGYA_USER_SECRET"],
|
|
165
|
+
:debug_connection => ENV["GIGYA_DEBUG_CONNECTION"] == "1"
|
|
165
166
|
)
|
|
166
167
|
conn.jwt_skip_validation = false
|
|
167
168
|
conn
|
|
@@ -222,7 +223,7 @@ module Gigya
|
|
|
222
223
|
def build_test_jwt(uid = nil, data_options = {}, expiration = nil, gigya_munge = false)
|
|
223
224
|
data_options = (data_options || {}).dup
|
|
224
225
|
data_options["sub"] = uid unless uid.nil?
|
|
225
|
-
data_options["sub"] ||=SecureRandom.uuid
|
|
226
|
+
data_options["sub"] ||= SecureRandom.uuid
|
|
226
227
|
data_options["apiKey"] ||= (@opts[:api_key] || "no_api_key")
|
|
227
228
|
data_options["iss"] ||= "https://fidm.gigya.com/jwt/#{data_options["apiKey"]}/"
|
|
228
229
|
data_options["iat"] ||= (Time.now - 10.seconds).to_i
|
data/lib/gigya/user.rb
CHANGED
|
@@ -3,6 +3,15 @@ module Gigya
|
|
|
3
3
|
attr_accessor :gigya_details
|
|
4
4
|
attr_accessor :gigya_connection
|
|
5
5
|
|
|
6
|
+
@@extra_profile_fields = []
|
|
7
|
+
def self.extra_profile_fields=(val)
|
|
8
|
+
@@extra_profile_fields = val
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def self.extra_profile_fields
|
|
12
|
+
@@extra_profile_fields
|
|
13
|
+
end
|
|
14
|
+
|
|
6
15
|
@@default_gigya_user_class = nil
|
|
7
16
|
def self.default_gigya_user_class
|
|
8
17
|
@@default_gigya_user_class
|
|
@@ -42,7 +51,7 @@ module Gigya
|
|
|
42
51
|
|
|
43
52
|
def reload
|
|
44
53
|
conn = gigya_connection || Gigya::Connection.shared_connection
|
|
45
|
-
set_attributes(conn.api_get("accounts", "getAccountInfo", {UID: uid}))
|
|
54
|
+
set_attributes(conn.api_get("accounts", "getAccountInfo", {UID: uid, include:"profile,data,subscriptions,userInfo,preferences", extraProfileFields:@@extra_profile_fields.join(",")}))
|
|
46
55
|
end
|
|
47
56
|
|
|
48
57
|
def save
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jonathan Bartlett
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2018-
|
|
12
|
+
date: 2018-10-04 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: httparty
|