mn_utils_gem 1.14.0 → 1.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mn_utils_gem/sso.rb +5 -0
- data/lib/mn_utils_gem/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9dd7f0e45d09dbe91d637ca39b4803c5ace35bf1a291bb0a8f24d3eab25ec180
|
4
|
+
data.tar.gz: 2ceebf3260f7d4583a51748dc6f43d261fc71ec83252a8a7491048ef599510f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6138e24185e22071e28e1df512ba08be07b36380d1fa67d8a2b549e52d5e6bd5a16a16d14f47177401ed41bc0fb8ebdcae60c06f4fa33d6d3420b2e01d4d560b
|
7
|
+
data.tar.gz: eef8b9f1a42ddc7e0b30796ae0b312e33828c3f83f7fc39d23d87d34d070a2745c5a219b27b3d307b089e7bb1eab83a5fc91edab946b4d352f6cfd8b561340f0
|
data/lib/mn_utils_gem/sso.rb
CHANGED
@@ -37,9 +37,13 @@ module MnUtilsAuth
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def set_sso(cookies, user_id, other_attributes = {})
|
40
|
+
@logger.debug "in set_sso 1"
|
40
41
|
return if cookies.nil? || user_id.blank? || redis_server.nil? || RequestStore.store[:sso]
|
42
|
+
@logger.debug "in set_sso 2"
|
41
43
|
if cookies[SSO_COOKIE_NAME].nil?
|
44
|
+
@logger.debug "in set_sso 3 #{cookies[SSO_COOKIE_NAME]}"
|
42
45
|
cookie = set_sso_cookie cookies
|
46
|
+
@logger.debug "in set_sso 4 #{cookie}"
|
43
47
|
value = other_attributes.reverse_merge({ user_id: user_id })
|
44
48
|
redis_server.set(cookie, JSON[value])
|
45
49
|
RequestStore.store[:sso] = value
|
@@ -65,6 +69,7 @@ module MnUtilsAuth
|
|
65
69
|
secure: true,
|
66
70
|
httponly: true
|
67
71
|
}
|
72
|
+
cookies[SSO_COOKIE_NAME]
|
68
73
|
end
|
69
74
|
|
70
75
|
def redis_server
|
data/lib/mn_utils_gem/version.rb
CHANGED