Module Authlogic::Session::Cookies::Config
In: lib/authlogic/session/cookies.rb

Configuration for the cookie feature set.

Methods

Public Instance methods

The name of the cookie or the key in the cookies hash. Be sure and use a unique name. If you have multiple sessions and they use the same cookie it will cause problems. Also, if a id is set it will be inserted into the beginning of the string. Exmaple:

  session = UserSession.new
  session.cookie_key => "user_credentials"

  session = UserSession.new(:super_high_secret)
  session.cookie_key => "super_high_secret_user_credentials"
  • Default: "#{guessed_klass_name.underscore}_credentials"
  • Accepts: String
cookie_key=(value = nil)

Alias for cookie_key

Should the cookie be set as httponly? If true, the cookie will not be accessable from javascript

  • Default: false
  • Accepts: Boolean
httponly=(value = nil)

Alias for httponly

If sessions should be remembered by default or not.

  • Default: false
  • Accepts: Boolean
remember_me=(value = nil)

Alias for remember_me

The length of time until the cookie expires.

  • Default: 3.months
  • Accepts: Integer, length of time in seconds, such as 60 or 3.months
remember_me_for=(value = :_read)

Alias for remember_me_for

Should the cookie be set as secure? If true, the cookie will only be sent over SSL connections

  • Default: false
  • Accepts: Boolean
secure=(value = nil)

Alias for secure

[Validate]