Class: SessionHandler

  • Package: saf.Session
  • Author: John Luxford <lux@simian.ca>
  • Copyright: Copyright (C) 2001-2003, Simian Systems Inc.
  • License: http://www.sitellite.org/index/license Simian Open Software License
  • Version: 1.0, 2002-10-10, $Id: Handler.php,v 1.3 2007/10/06 00:06:30 lux Exp $
  • Access: public

This is the base client handler package for saf.Session. Custom
handlers are created by sub-classing this package.


Usage Example


<?php

$h 
= new SessionHandler;

$h->setProperties (array (
    
'foo'    => 'bar',
));

$h->sendAuthRequest ();

?>

Return to Top



Properties


$access = array ()


$status = array ()


$roles = array ()


$teams = array ()


$resources = array ()


$user = array ()


$prefs = array ()


$_prefs = array ()


$path


$realm


$cancelmessage = 'You do not have permission to access this resource.'


$cookiename = 'sitellite_session_id'

  • Access: public

Name of the cookie. Defaults to 'sitellite_session_id'.


$cookieexpires = 0

  • Access: public

Expiration of cookie. Defaults to 0, which means the cookie
will expire when the browser closes.


$cookiedomain

  • Access: public

Domain value of the cookie.


$cookiepath = '/'

  • Access: public

Path value of the cookie. Defaults to '/'.


$cookiesecure = 0

  • Access: public

Secure value of the cookie. May be 1 or 0, and defaults to 0.


$usernamefield = 'username'

  • Access: public

The name of the username field in the form (uses saf.MailForm)
created by sendAuthRequest(). Defaults to 'username'.


$passwordfield = 'password'

  • Access: public

The name of the password field in the form
created by sendAuthRequest(). Defaults to 'password'.


$hiddenfields = array ()

  • Access: public

A list of hidden form fields and their values.


$usernametext = 'Username'

  • Access: public

The alt text of the username field in the form
created by sendAuthRequest(). Defaults to 'Username'.


$passwordtext = 'Password'

  • Access: public

The alt text of the password field in the form
created by sendAuthRequest(). Defaults to 'Password'.


$submittext = 'Sign In'

  • Access: public

The alt text of the submit button in the form
created by sendAuthRequest(). Defaults to 'Sign In'.


$formtemplate = false

  • Access: public

The template of the form created by sendAuthRequest().
Defaults to false (no template).


$usernamerules = array ()

  • Access: public

A list of rules for the username form field. The keys are
the rules and the values are the invalid messages.


$passwordrules = array ()

  • Access: public

A list of rules for the password form field. The keys are
the rules and the values are the invalid messages.


$formmessage = 'Please enter your username and password.'

  • Access: public

The welcome message of the form. Defaults to
'Please enter your username and password.'


$invalidmessage = 'Sorry, the password you specified was invalid. Please try again.'

  • Access: public

The invalid message of the form. Defaults to
'Sorry, the password you specified was invalid. Please try again.'


$timeoutmessage = 'Sorry, your session has timed out.  Please sign in again to continue.'

  • Access: public

The timeout message of the form. Defaults to
'Sorry, your session has timed out. Please sign in again to continue.'


$sessObj

  • Access: public

A reference to the main session object, in case it's
needed by a specific handler.


$error

  • Access: public

The error message if an error occurs.

Return to Top



Methods


SessionHandler ()

  • Access: public

Constructor method.


setProperties ($properties)

  • Access: public

Sets the properties of this object.


start ($id, $authorized = false)

  • Access: public
  • Return: boolean

Initializes the communication with the client.


sendAuthRequest ()

  • Access: public

Sends an authorization request to the user.


close ()

  • Access: public

Closes the session with the user.


changeTimeout ($newduration)

  • Access: public

Resets the client info with a new timeout value.

Return to Top

Copyright © 2008 Sitellite CMS Project

Powered by Sitellite 5.0 Content Management System