lib/global_session/session.rb in global_session-3.0.4 vs lib/global_session/session.rb in global_session-3.0.5
- old
+ new
@@ -23,14 +23,16 @@
#
# This module also acts as a façade for reading global session cookies generated
# by the different versions; it is responsible for detecting the version of
# a given cookie, then instantiating a suitable session object.
module GlobalSession::Session
- # Decode a global session cookie without
+ # Decode a global session cookie without checking signature or expiration. Good for debugging.
def self.decode_cookie(cookie)
guess_version(cookie).decode_cookie(cookie)
end
+ # Decode a global session cookie. Use a heuristic to determine the version.
+ # @raise [GlobalSession::MalformedCookie] if the cookie is not a valid serialized global session
def self.new(directory, cookie=nil, valid_signature_digest=nil)
guess_version(cookie).new(directory, cookie)
end
def self.guess_version(cookie)