Method: Merb::BootLoader::MixinSessionContainer.check_for_secret_key

Defined in:
lib/merb-core/bootloader.rb

.check_for_secret_keyObject

Attempts to set the session secret key. This method will exit if the key does not exist or is shorter than 16 charaters.



605
606
607
608
609
610
611
# File 'lib/merb-core/bootloader.rb', line 605

def self.check_for_secret_key
  unless Merb::Config[:session_secret_key] && (Merb::Config[:session_secret_key].length >= 16)
    Merb.logger.warn("You must specify a session_secret_key in your init file, and it must be at least 16 characters\nbailing out...")
    exit!
  end
  Merb::Controller._session_secret_key = Merb::Config[:session_secret_key]
end