Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#178: Feature request to encrypt session data stored in cookies #182

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Aug 19, 2019

  1. Created a utility module to handle the encryption and decryption of s…

    …ession data stored in the cookie. The encrypted data, along with the IV and AuthTag (where applicable) are encoded as a base64 string in the cookie data. A RangeError is thrown if the base64 encoded string exceeds the cookie max length of 4093 bytes, while the module exposes the 'encryptData' and 'decryptData' functions.
    jmitchell38488 committed Aug 19, 2019
    Configuration menu
    Copy the full SHA
    be13b64 View commit details
    Browse the repository at this point in the history
  2. Updated calls to the opts.encode and opts.decode to include the opts …

    …object. This is used to pass the user defined options through to the crypto encode/decode functions
    jmitchell38488 committed Aug 19, 2019
    Configuration menu
    Copy the full SHA
    6229663 View commit details
    Browse the repository at this point in the history
  3. Added 'defaults' options constant, with the pre-defined options that …

    …are used as per the initialisation steps. Updated the 'formatOpts' function to use the defaults values, and added 'useCrypt' as an option, to cryptographically encode/decode the session data stored in the cookie. This uses the existing session storage in the cookie functionality, and only encodes the data when session store is set to cookie.
    jmitchell38488 committed Aug 19, 2019
    Configuration menu
    Copy the full SHA
    e2d86a7 View commit details
    Browse the repository at this point in the history