The WFAuthorizationInfo object stores all access control information for the logged-in user.
The base class provides the ability to tell if someone is logged in, if they logged in recently, and their userid. For many applications, this is all that's needed.
For applications requiring more complicated access control, they should subclass WFAuthorizationInfo and provide further access control information and methods to query it.
NOTE: The WFAuthorizationInfo class is stored in the SESSION at the time of login. The WFAuthorizationInfo is immutable once stored in the session; whatever rights are given to the user at login remain with him until he logs in again (this includes REMEMBER-ME login). The WFAuthorizationInfo MUST be easily serializable! No circular references, etc... subclasses be careful!
NOTE: If you are using a subclass of WFAuthorizationInfo, please note that the authorizationInfo managed by WFAuthorizationManager will only be of your subclass' type if someone is logged in. Until then, it's always WFAuthorizationInfo. So, always test isLoggedIn() before accessing authorizationInfo as your subclass.
Located in /framework/WFAuthorization.php (line 137)
WFObject | --WFAuthorizationInfo
Is there a user logged in?
Has the user authenticated recently?
Some sites may wish to keep a user logged in forever, even with "remember me", but then restrict access to extremely sensitive data by requiring that a user is in a "recent" session. That is, they have recently authenticated with username/password and have not been "idle" in that session for more than a short period of time.
Is the current user a superuser?
Set the superuser status.
Set the user id of the authorized user.
What is the userid of the currently logged in user?
Inherited From WFObject
WFObject::__construct()
WFObject::exposedProperties()
WFObject::getClass()
WFObject::keyPathToTargetAndKey()
WFObject::setValueForKey()
WFObject::setValueForKeyPath()
WFObject::validateValueForKey()
WFObject::validateValueForKeyPath()
WFObject::valueForKey()
WFObject::valueForKeyPath()
WFObject::valueForUndefinedKey()
WFObject::__toString()
Documentation generated on Thu, 17 Apr 2008 13:51:31 -0400 by phpDocumentor 1.4.1