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.
Pour offrir une bonne expérience, l'utilisation de cookies est nécessaire. Certains sont essentiels au bon fonctionnement du site, tandis que d'autres nous aident à mieux répondre à vos intérêts.