NAME
Labyrinth::Session - Session Management for Labyrinth.
SYNOPSIS
use Labyrinth::Session;
Login($username,$password);
my $logged_in = 1 if(my $user = ValidSession());
DESCRIPTION
Provides the session management functionality, including Login & Logout functions, to maintain a user's access to the system.
FUNCTIONS
- Login
-
Handles login capabilities, including bad logins.
- Logout
-
Handles logout capabilities.
- ValidSession
-
Reloads an existing session, or creates a new one.
- Store
-
Stores the current request, while the user logs in. (A simple form of continuations)
- Retrieve
-
Retrieves the last request, if the user has logged in. (A simple form of continuations) If the user is already login will set according to their realm.
- Authorised($level[,$userid])
-
Verifies the user has authorisation to the requested level. If userid is omitted, the current user is assumed.
- UserAccess
-
Returns the folders the user (and associated groups) has access to.
- VerifyUser
-
Looks up the user's authorisation level, based on their user id and any groups they belong to.
- CheckUser
-
Given a username and password checks the database to ensure that the user exists. Note that this uses both SHA1 (new encryption) and OLD_PASSWORD (old encyription) to find the user. The latter is preserved for older implementations.
- GetFolderIDs
-
Returns the list of folders the given user has access to.
- GetGroupIDs
-
Returns the list of groups the given user has access to.
- ResetLanguage
-
Within the current session, this function allows the user to change the language associated within the system.
Currently this language element is under used, and could be used for error and message strings pulled from a phrasebook.
- UpdateSession
-
Updates specific fields for the current session.
OBJECT METHODS
In addition to the above functions, the Session Management also allows for an object interface.
- new
-
Create a new session object.
- realm
-
Returns the current realm.
SEE ALSO
Digest::MD5
Labyrinth
AUTHOR
Barbie, <barbie@missbarbell.co.uk> for Miss Barbell Productions, http://www.missbarbell.co.uk/
COPYRIGHT & LICENSE
Copyright (C) 2002-2011 Barbie for Miss Barbell Productions
All Rights Reserved.
This module is free software; you can redistribute it and/or
modify it under the Artistic License 2.0.