method

new

Importance_0
v5.1.7 - Show latest stable - 0 notes - Class: EncryptedCookieJar
new(parent_jar) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_dispatch/middleware/cookies.rb, line 571
      def initialize(parent_jar)
        super

        if ActiveSupport::LegacyKeyGenerator === key_generator
          raise "You didn't set secrets.secret_key_base, which is required for this cookie jar. "              "Read the upgrade documentation to learn more about this new config option."
        end

        secret = key_generator.generate_key(request.encrypted_cookie_salt || "")[0, ActiveSupport::MessageEncryptor.key_len]
        sign_secret = key_generator.generate_key(request.encrypted_signed_cookie_salt || "")
        @encryptor = ActiveSupport::MessageEncryptor.new(secret, sign_secret, digest: digest, serializer: ActiveSupport::MessageEncryptor::NullSerializer)
      end
Register or log in to add new notes.