global_session 3.2.3 → 3.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -1
- data/VERSION +1 -1
- data/global_session.gemspec +3 -3
- data/lib/global_session/session/v3.rb +36 -0
- 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: c7e181a406367d55cef38b2965dcfaa5d7f5a601
|
4
|
+
data.tar.gz: aded36bd963545b5930fdec586cf1ebf1824c1ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24a37d9464766407ad1150318c1cfc1e6c1fefd09023fb4c9433fda7ab68ba9f59ef10dd71f5fd23815cef17b0927ca4c913083c562039735e2ed9bd03eedf88
|
7
|
+
data.tar.gz: d33635ee36886e29d4422a0a3a1e48e5caf4977b08c10e7023b7de55815f87c06d7fb62a9bc92e9543879b2937e143ab2b5e3c700fdd4916cbd9d4990f252e1d
|
data/.travis.yml
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.2.
|
1
|
+
3.2.4
|
data/global_session.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: global_session 3.2.
|
5
|
+
# stub: global_session 3.2.4 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "global_session"
|
9
|
-
s.version = "3.2.
|
9
|
+
s.version = "3.2.4"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Tony Spataro"]
|
14
|
-
s.date = "
|
14
|
+
s.date = "2016-02-05"
|
15
15
|
s.description = "This Rack middleware allows several web apps in an authentication domain to share session state, facilitating single sign-on in a distributed web app. It only provides session sharing and does not concern itself with authentication or replication of the user database."
|
16
16
|
s.email = "support@rightscale.com"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -107,6 +107,32 @@ module GlobalSession::Session
|
|
107
107
|
result
|
108
108
|
end
|
109
109
|
|
110
|
+
# Delete a key from the global session attributes. If the key exists,
|
111
|
+
# mark the global session dirty
|
112
|
+
#
|
113
|
+
# @param [String] the key to delete
|
114
|
+
# @return [Object] the value of the key deleted, or nil if not found
|
115
|
+
def delete(key)
|
116
|
+
key = key.to_s #take care of symbol-style keys
|
117
|
+
raise GlobalSession::InvalidSession unless valid?
|
118
|
+
|
119
|
+
if @schema_signed.include?(key)
|
120
|
+
authority_check
|
121
|
+
|
122
|
+
# Only mark dirty if the key actually exists
|
123
|
+
@dirty_secure = true if @signed.keys.include? key
|
124
|
+
value = @signed.delete(key)
|
125
|
+
elsif @schema_insecure.include?(key)
|
126
|
+
|
127
|
+
# Only mark dirty if the key actually exists
|
128
|
+
@dirty_insecure = true if @insecure.keys.include? key
|
129
|
+
value = @insecure.delete(key)
|
130
|
+
else
|
131
|
+
raise ArgumentError, "Attribute '#{key}' is not specified in global session configuration"
|
132
|
+
end
|
133
|
+
|
134
|
+
return value
|
135
|
+
end
|
110
136
|
|
111
137
|
# Serialize the session to a form suitable for use with HTTP cookies. If any
|
112
138
|
# secure attributes have changed since the session was instantiated, compute
|
@@ -248,6 +274,16 @@ module GlobalSession::Session
|
|
248
274
|
|
249
275
|
private
|
250
276
|
|
277
|
+
# This is called by #clone and is used to augment the shallow clone behavior
|
278
|
+
#
|
279
|
+
# @return [Object] this global session object which doesn't reference the
|
280
|
+
# the hashes from the original object
|
281
|
+
def initialize_copy(source)
|
282
|
+
super
|
283
|
+
@signed = ::RightSupport::Data::HashTools.deep_clone2(@signed)
|
284
|
+
@insecure = ::RightSupport::Data::HashTools.deep_clone2(@insecure)
|
285
|
+
end
|
286
|
+
|
251
287
|
def load_from_cookie(cookie) # :nodoc:
|
252
288
|
hash = nil
|
253
289
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: global_session
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Spataro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|