In Rails, cookie-based sessions are encoded, signed and encrypted by default magically. However, it is hard to do the same thing with Sinatra or Rack. In this session, I will introduce how decorator pattern works in Ruby and show how flexible it can integrate with cookie-based session encoding instead of installing gems like "rack-session-encryption" or "encrypted_cookie".
I am a web developer in roundTAIWANround Inc. from Taiwan, founder of 5xRuby, a book writer, the creator of "exif" and "jaro_winkler" gem, also an active open source contributor in ruby world.
To provide the best experiences, the usage of cookies are necessary. Some are essential for the proper functioning of the site, while others help us better cater to your interests.