module ActionDispatch::Cookies::VerifyAndUpgradeLegacySignedMessage

def initialize(*args)

def initialize(*args)
  super
  @legacy_verifier = ActiveSupport::MessageVerifier.new(@options[:secret_token])
end

def verify_and_upgrade_legacy_signed_message(name, signed_message)

def verify_and_upgrade_legacy_signed_message(name, signed_message)
  @legacy_verifier.verify(signed_message).tap do |value|
    self[name] = value
  end
rescue ActiveSupport::MessageVerifier::InvalidSignature
  nil
end