abstract class Session::Store(T)

Included Modules

Direct Known Subclasses

Defined in:

store.cr

Class Method Summary

Instance Method Summary

Instance methods inherited from module Session::Provider

encrypt_and_sign(value) encrypt_and_sign, on(event : Symbol, *args) on, prefixed(session_id) prefixed, session_key session_key, storage : String storage, timeout timeout, verify_and_decrypt(value) verify_and_decrypt

Class Method Detail

def self.provider(**args) : Store(T) #

[View source]

Instance Method Detail

abstract def [](key : String) : SessionId(T) #

[View source]
abstract def []=(key : String, session : SessionId(T)) : SessionId(T) #

[View source]
abstract def []?(key : String) : SessionId(T) | Nil #

[View source]
abstract def clear #

[View source]
def cookie(host : String) #

Creates the session cookie


[View source]
def create #

Creates a new session for the given data Data is generic


[View source]
def current_session : SessionId(T) #

def data #

[View source]
abstract def delete(key : String) #

[View source]
def delete #

Deletes the current session


[View source]
def load_from(request_cookies : HTTP::Cookies) : SessionId(T) | Nil #

Loads the session from a HTTP::Cookie


[View source]
def session_id #

[View source]
def set_cookies(response_cookies : HTTP::Cookies, host : String = "") #

[View source]
abstract def size : Int64 #

[View source]
def valid? #

[View source]