Swank Wiki
Recently Visited

Swank v0.04.04


Implements session objects for Swank.  Session data in stored in non-indexed, non-revision-controlled page objects under /session.  The session key is stored in a cookie called "sws".


Swank::IO (or subclass) must be before Swank::Session in the class heirarchy.


session()  -- accessor for current session

start_session()  -- private subroutine to load current or new session

save_session()  -- private subroutine to save session


handler()  -- to load session, via session_start

top_action()  -- to save session at request end

Support Pages:

/session  -- provides support methods for session objects

session.group('group_name')  -- returns group page if group is active for current user, or false.

session.user  -- returns current user page

/session/*   --  session objects are stored as pages under /session

Session objects have "norcs" field set to disable version control,
and have "noindex" field set to disable indexing.

"user" field will be a user pageref if someone is logged in, and other user fields are copied into the session.  Calls $self->auth-default to load group info into session.