SGlobalAuthModule Class Reference

Handle authentication of a user to the Public or ldap realm. More...

Inheritance diagram for SGlobalAuthModule:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 __construct ()
 INSERT BRIEF DESCRIPTION HERE.
 __sleep ()
 INSERT BRIEF DESCRIPTION HERE.
 __wakeup ()
 INSERT BRIEF DESCRIPTION HERE.
 authenticate ($username, $password)
 Attempt to authenticate this module with a Global Authentication Database username and password.
 getEmail ()
 Gets user email address.
 getFirstName ()
 Gets user first name.
 getGroups ()
 Gets groups user is in.
 getLastName ()
 Gets user last name.
 getLdap ()
 Gets ldap connection.
 getLdapUID ()
 Gets ldap user id.
 getPermissions ()
 Not Yet Implemented.
 getProjects ()
 Gets projects user is in.
 getRole ()
 Gets role of user.
 getUID ()
 Gets authentication database user id.
 getUser ()
 Gets authentication database user object.
 inProject ($project)
 Checks if user is in a project.
 requireProjects ($projects, $redirect=null)
 Requires user to be in projects.
 syncUserWithLdap ()
 Syncs user information with ldap.

Protected Member Functions

 setEmail ($email)
 INSERT BRIEF DESCRIPTION HERE.
 setLdapUID ($uid)
 INSERT BRIEF DESCRIPTION HERE.
 setUID ($uid)
 INSERT BRIEF DESCRIPTION HERE.
 setUserName ($username)
 INSERT BRIEF DESCRIPTION HERE.


Detailed Description

Handle authentication of a user to the Public or ldap realm.

Author:
Dayyan (dayyanb)
Date:
7/8/2009

Definition at line 9 of file SGlobalAuthModule.php5.


Constructor & Destructor Documentation

SGlobalAuthModule::__construct (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from SObject.

Definition at line 34 of file SGlobalAuthModule.php5.


Member Function Documentation

SGlobalAuthModule::__sleep (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 443 of file SGlobalAuthModule.php5.

SGlobalAuthModule::__wakeup (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 454 of file SGlobalAuthModule.php5.

References AuthUser::retrieve().

SGlobalAuthModule::authenticate ( username,
password 
)

Attempt to authenticate this module with a Global Authentication Database username and password.

Parameters:
$username [string]: A username to authenticate
$password [string]: A password to authenticate
Returns:
[bool]: True if authentication worked, false if not, null if error
Connect to the database, verify the user, and then set the attributes of this object from the (first) matching user record that is found.

Definition at line 47 of file SGlobalAuthModule.php5.

References SObject::getError(), AuthUserToGenGroup::getList(), AuthUserToProject::getList(), AuthUser::getList(), AuthInvalidLoginAttempt::getList(), SConfig::getOption(), SObject::setPrettyError(), and syncUserWithLdap().

SGlobalAuthModule::getEmail (  ) 

Gets user email address.

Returns:
[string]: Authentication database user email address

Definition at line 366 of file SGlobalAuthModule.php5.

SGlobalAuthModule::getFirstName (  ) 

Gets user first name.

Returns:
[string]: Authentication database user first name

Definition at line 348 of file SGlobalAuthModule.php5.

SGlobalAuthModule::getGroups (  ) 

Gets groups user is in.

Returns:
[array]: Numerically indexed array of group names

Definition at line 288 of file SGlobalAuthModule.php5.

SGlobalAuthModule::getLastName (  ) 

Gets user last name.

Returns:
[string]: Authentication database user last name

Definition at line 357 of file SGlobalAuthModule.php5.

SGlobalAuthModule::getLdap (  ) 

Gets ldap connection.

Returns:
[object]: SLdap object

Definition at line 375 of file SGlobalAuthModule.php5.

SGlobalAuthModule::getLdapUID (  ) 

Gets ldap user id.

Does NOT return authentication database user id

Returns:
[int]: Ldap user id, or null if this is not an ldap user

Definition at line 339 of file SGlobalAuthModule.php5.

SGlobalAuthModule::getPermissions (  ) 

Not Yet Implemented.

Returns:
[bool]: false

Definition at line 317 of file SGlobalAuthModule.php5.

SGlobalAuthModule::getProjects (  ) 

Gets projects user is in.

Returns:
[array]: Numerically indexed array of project names

Definition at line 279 of file SGlobalAuthModule.php5.

SGlobalAuthModule::getRole (  ) 

Gets role of user.

Returns:
[string]: User role, currently hardcoded as "other"

Definition at line 308 of file SGlobalAuthModule.php5.

SGlobalAuthModule::getUID (  ) 

Gets authentication database user id.

Does NOT return ldap user id

Returns:
[int]: Authentication database user id

Definition at line 328 of file SGlobalAuthModule.php5.

SGlobalAuthModule::getUser (  ) 

Gets authentication database user object.

Returns:
[object]: AuthUser object

Definition at line 384 of file SGlobalAuthModule.php5.

SGlobalAuthModule::inProject ( project  ) 

Checks if user is in a project.

Parameters:
$project [string]: Project name
Returns:
[bool]: true if user is in project, false if user is not

Definition at line 299 of file SGlobalAuthModule.php5.

SGlobalAuthModule::requireProjects ( projects,
redirect = null 
)

Requires user to be in projects.

Redirects to access denied page if user is not in all projects specified

Parameters:
$projects [array]: Array of projects to be required
$redirect [string]: Url to redirect to if user is not in projects. Defaults to $PATH['acess_denied'] or if that fails, $PATH['main'], or if that fails, "/"

Definition at line 182 of file SGlobalAuthModule.php5.

References SObject::setPrettyError().

SGlobalAuthModule::setEmail ( email  )  [protected]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Parameters:
$email [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 432 of file SGlobalAuthModule.php5.

SGlobalAuthModule::setLdapUID ( uid  )  [protected]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Parameters:
$uid [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 408 of file SGlobalAuthModule.php5.

SGlobalAuthModule::setUID ( uid  )  [protected]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Parameters:
$uid [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 396 of file SGlobalAuthModule.php5.

SGlobalAuthModule::setUserName ( username  )  [protected]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Parameters:
$username [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 420 of file SGlobalAuthModule.php5.

SGlobalAuthModule::syncUserWithLdap (  ) 

Syncs user information with ldap.

Syncs user information with ldap information, also makes sure user is in "Shodor Internal" project if they are an ldap user and that they are not if they are not an ldap user. Called during authentication automatically.

Definition at line 211 of file SGlobalAuthModule.php5.

Referenced by authenticate().


The documentation for this class was generated from the following file:

Generated on Wed Nov 24 02:06:13 2010 for Common by  doxygen 1.5.6