class Marten::Conf::GlobalSettings::Sessions

Overview

Allows to configure sessions-related settings.

Defined in:

marten/conf/global_settings/sessions.cr

Instance Method Summary

Instance Method Detail

def cookie_domain : String? #

Returns the domain to use when setting the session cookie.


[View source]
def cookie_domain=(cookie_domain : Nil | String) #

Allows to set the domain to use when setting the session cookie.


[View source]
def cookie_http_only : Bool #

Returns a boolean indicating whether client-side scripts should have access to the session cookie.


[View source]
def cookie_http_only=(cookie_http_only : Bool) #

Allows to set whether client-side scripts should have access to the session cookie.


[View source]
def cookie_max_age : Int32 #

Returns the max age (in seconds) of the session cookie.

By default, the session cookie max age is set to 1209600 (two weeks).


[View source]
def cookie_max_age=(cookie_max_age : Int32) #

Allows to set the max age (in seconds) of the session cookie.


[View source]
def cookie_name : String #

Returns the name of the cookie to use for sessions (defaults to "sessionid").


[View source]
def cookie_name=(cookie_name : String | Symbol) #

Allows to set the name of the cookie to use for sessions.


[View source]
def cookie_same_site : String #

Returns the value of the SameSite flag to use for the session cookie (defaults to "Lax").


[View source]
def cookie_same_site=(cookie_same_site : String) #

Allows to set the value of the SameSite flag to use for the session cookie.


[View source]
def cookie_secure : Bool #

Returns a boolean indicating whether to use a secure cookie for the session cookie.


[View source]
def cookie_secure=(cookie_secure : Bool) #

Allows to set whether secure cookies should be used for session cookies.


[View source]
def store : String #

Returns the identifier of the store that should be used to handle sessions.


[View source]
def store=(store : String | Symbol) #

Allows to define the store used to handle sessions.


[View source]