lib/global_session/session/v3.rb in global_session-3.2.7 vs lib/global_session/session/v3.rb in global_session-3.2.8
- old
+ new
@@ -20,10 +20,13 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Standard library dependencies
require 'set'
+# Cryptographical Hash
+require 'right_support/crypto'
+
module GlobalSession::Session
# Global session V3 uses JSON serialization, no compression, and a detached signature that is
# excluded from the JSON structure for efficiency reasons.
#
# The binary structure of a V3 session looks like this:
@@ -121,17 +124,17 @@
# Only mark dirty if the key actually exists
@dirty_secure = true if @signed.keys.include? key
value = @signed.delete(key)
elsif @schema_insecure.include?(key)
-
+
# Only mark dirty if the key actually exists
@dirty_insecure = true if @insecure.keys.include? key
value = @insecure.delete(key)
else
raise ArgumentError, "Attribute '#{key}' is not specified in global session configuration"
end
-
+
return value
end
# Serialize the session to a form suitable for use with HTTP cookies. If any
# secure attributes have changed since the session was instantiated, compute