Class BasicAuth

Description

User Authentication

  • todo: //TODO: update permissions system
  • todo: //TODO: documentation

Located in /inc/bb/basicauth.php (line 38)


	
			
Direct descendents
Class Description
BumblebeeAuth User *authorisation* and *authentication* object
Variable Summary
integer $DEBUG
mixed $email
mixed $localLogin
mixed $name
mixed $table
mixed $uid
mixed $username
array $user_row
mixed $_error
mixed $_loggedin
Method Summary
BasicAuth BasicAuth (array $data, [boolean $recheck = false], [string $table = 'users'])
void getRemoteIP ()
boolean isLoggedIn ()
void isMe ( $id)
boolean isValidTag (string $tag)
string loginError ()
void logout ()
string makeValidationTag ()
void updatePassword ( $pass)
void _auth_local ( $username,  $password)
void _auth_via_ldap ( $username,  $password)
void _auth_via_radius ( $username,  $password)
void _createSession (array $row)
boolean _login ( $data)
void _retrieveUserInfo ( $identifier, [ $type = 1])
mixed _var_get ( $var)
void _var_put (string $var, mixed $value)
void _verifyLogin ()
Variables
integer $DEBUG = 0 (line 50)
  • var: debug level (0=off, 10=verbose)
mixed $email (line 42)
mixed $localLogin = 0 (line 46)
mixed $name (line 41)
mixed $table (line 45)
mixed $uid (line 39)
mixed $username (line 40)
array $user_row = array() (line 48)
  • var: database row for the user
mixed $_error = '' (line 44)
mixed $_loggedin (line 43)
Methods
Constructor BasicAuth (line 59)

Create the authentication object

BasicAuth BasicAuth (array $data, [boolean $recheck = false], [string $table = 'users'])
  • array $data: array containing keys 'username' and 'pass'
  • boolean $recheck: (optional) ignore session data and check anyway
  • string $table: (optional) db table from which login data should be taken
getRemoteIP (line 364)
void getRemoteIP ()
isLoggedIn (line 119)

test function to see if user is logge in

  • return: user is logged in
boolean isLoggedIn ()
isMe (line 360)
void isMe ( $id)
  • $id
isValidTag (line 110)

Test if the magic tag in the form matches the magic tag for this user

boolean isValidTag (string $tag)
  • string $tag: submitted tag to be tested
loginError (line 136)

obtain an error string that (if appropriate) describes the failure mode

  • return: error message
string loginError ()
logout (line 126)

log the user out of the system

void logout ()
makeValidationTag (line 98)

Generate a pseudo-random tag that is unique to this user and installation

The tag is unique to this user and this installation of Bumblebee so that it can be used to test whether the submitted data is from a Bumblebee-produced form or if it is perhaps from a spoofed source.

string makeValidationTag ()
updatePassword (line 374)
void updatePassword ( $pass)
  • $pass
_auth_local (line 347)
void _auth_local ( $username,  $password)
  • $username
  • $password
_auth_via_ldap (line 317)

LDAP auth method to login the user against an LDAP server

void _auth_via_ldap ( $username,  $password)
  • $username
  • $password
_auth_via_radius (line 289)

RADIUS auth method to login the user against a RADIUS server

void _auth_via_radius ( $username,  $password)
  • $username
  • $password
_createSession (line 178)

create the login session for persistant data storage

void _createSession (array $row)
  • array $row: database row for the user
_login (line 215)

check login details, if OK, set up a PHP SESSION to manage the login

  • return: credentialsOK
boolean _login ( $data)
  • $data
_retrieveUserInfo (line 269)
void _retrieveUserInfo ( $identifier, [ $type = 1])
  • $identifier
  • $type
_var_get (line 169)

retrieve a piece of data previously stored

  • return: value stored
mixed _var_get ( $var)
  • $var
_var_put (line 160)

store a piece of data in the session for persistance across page calls

void _var_put (string $var, mixed $value)
  • string $var: name to call the data in the session
  • mixed $value: value to store
_verifyLogin (line 188)
void _verifyLogin ()

Documentation generated on Tue, 06 Mar 2007 10:00:39 +0000 by phpDocumentor 1.3.0