Class AuthenticationBackendRDBMS

Description

Implements interfaces:

Authentication backend for SQL-based RDBMSs

Requires a tabled named "users" having the fields "uid" (usigned int), "password" (string), "uname" (string) in the default (config: "rdbms.default") or authentication database (config: "auth.rdbms.db"). Usernames as well as UIDs have be uniqe. You may use this piece of SQL to create a table like this:

  1. --
  2. -- Tablestructure of 'users' table
  3. --
  4.  
  5. CREATE TABLE `users` (
  6. `uid` int(10) unsigned NOT NULL auto_increment,
  7. `uname` varchar(100) NOT NULL,
  8. `password` varchar(255) NOT NULL COMMENT 'hashed password',
  9. PRIMARY KEY (`uid`),
  10. UNIQUE KEY `uname` (`uname`)
  11. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ;

Passwords are stored hashed by the Hash module.

Located in /phpsatk-lib/global/org.eenterphace.sat.auth.backend.rdbms/authentication.backend.rdbms.php (line 54)


	
			
Method Summary
AuthenticationBackendRDBMS __construct ()
boolean checkPassword (string $username, string $password)
Methods
Constructor __construct (line 69)

Gets a database connection from the connection pool

Uses either "auth.rdbms.db" if available or "rdmbs.default" as fallback.

  • access: public
AuthenticationBackendRDBMS __construct ()
checkPassword (line 80)

Checks the given credentials for correctness

  • access: public
boolean checkPassword (string $username, string $password)
  • string $username: Username
  • string $password: Password
getUserObject (line 105)

Gets the UID for a specified username

Throws an exception if the passed user does not exist.

  • access: public
AuthorizationUserRDBMS getUserObject (string $uname)
  • string $uname: Username

Documentation generated on Mon, 21 May 2007 10:34:40 +0200 by phpDocumentor 1.3.0RC5