Method: Authenticate::Configuration#secure_cookie

Defined in:
lib/authenticate/configuration.rb

Controls the secure setting on the session cookie. Defaults to false. When set, the browser will only send the cookie to the server over HTTPS. If set to true over an insecure http (not https) connection, the cookie will not be usable and the user will not be successfully authenticated.

You should set this value to true in live environments to prevent session hijacking.

For more, see [RFC6265](tools.ietf.org/html/rfc6265#section-5.2.5).

Returns:

  • (Boolean)


52
53
54
# File 'lib/authenticate/configuration.rb', line 52

def secure_cookie
  @secure_cookie
end