The WFAuthorizationManager helps the application manage user authentication, login, and access control.
By default, a web application has no login capabilities and thus all users are unprivileged.
WFAuthorizationManager works in conjuction with the bundled "login" module. The following is the public interface of the login module (via invocationPath redirects)
Located in /framework/WFAuthorization.php (line 251)
WFObject | --WFAuthorizationManager
Get a reference to the shared WFAuthorizationManager object.
Get the current auth info.
The URL to continue to if the user logs in but there is no "continue to url" set.
Will call the login delegate method to get info as well.
The URL to continue to if the user logs out.
Will call the login delegate method.
If NULL, no redirect will be performed, and just a message saying "Logout successful" will be seen.
Cause the visitor to be re-directed to the login page.
OPTIONAL: "continueURL" support.
This will issue a 302 redirect and exit the current request execution.
Initialize the auth manager to the default state.
Attempt to authorize the user with the given name/password.
This will call the delegate's login function to authenticate and get the authorizationInfo.
The message to display to a use on unsuccessful login.
Will call the login delegate method.
Get the login modulePath to use.
The login help message that should be displayed above the login box.
Will call the login delegate method.
Logout the current session.
Reset the password for the given user.
Your delegate method should craft an email or such to that user with the new password info. If there is a problem (ie user doesn't exist) throw a WFException with an appropriate message to be displyed. If not, just send your email and that's it. The default implementation will show an appropriate confirmation message.
Alternatively, if you have more complicated reset password logic you want to implement, throw a WFRedirectRequestException.
Will call the login delegate method.
Set the WFAuthorizationDelegate to use.
The WFWebApplication will usually do this for you.
Should a "forgot your password" link be shown?
Will call the login delegate method.
Should the login interface have a "remember me" checkbox?
Will call the login delegate method.
If "remember me" is enabled with shouldEnableRememberMe, should "remember me" be checked by default?
Will call the login delegate method.
Should there be an interstitial "You have logged out successfully, click here to continue", or should logout immediately redirect to defaultLogoutContinueURL()?
Will call login delegate.
The label to use for the "username" field.
Will call the login delegate method.
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()
ALLOW
= 1
(line 263)
DENY
= 2
(line 264)
RECENT_LOGIN_SECS
= 900
(line 261)
SESSION_KEY_AUTHORIZATION_INFO
= 'authorizationInfo'
(line 257)
SESSION_KEY_LOGGED_IN
= 'isLoggedIn'
(line 256)
SESSION_KEY_RECENT_LOGIN_TIME
= 'recentLoginTime'
(line 258)
SESSION_KEY_VERSION
= 'version'
(line 255)
SESSION_NAMESPACE
= 'WFAuthorizationManager'
(line 253)
VERSION
= 1.0
(line 260)
Documentation generated on Thu, 17 Apr 2008 13:51:31 -0400 by phpDocumentor 1.4.1