AccessKeyManager Class Reference
[Security]

Class defining operations for AccessKey management. More...

List of all members.

Public Member Functions

 _performPeriodicCleanup ()
 AccessKeyManager ()
 createKey ($context, $userId, $assocId, $expiryDays)
 generateKeyHash ($key)
validateKey ($context, $userId, $keyHash, $assocId=null)


Detailed Description

Class defining operations for AccessKey management.

See also:
AccessKey

Definition at line 19 of file AccessKeyManager.inc.php.


Member Function Documentation

AccessKeyManager._performPeriodicCleanup (  ) 

Periodically clean up expired keys.

Definition at line 79 of file AccessKeyManager.inc.php.

References DAORegistry.getDAO().

Referenced by AccessKeyManager().

AccessKeyManager.AccessKeyManager (  ) 

Constructor. Create a manager for access keys.

Definition at line 26 of file AccessKeyManager.inc.php.

References _performPeriodicCleanup(), and DAORegistry.getDAO().

AccessKeyManager.createKey ( context,
userId,
assocId,
expiryDays 
)

Create an access key with the given information.

Parameters:
$context string The context of the access key
$userId int The ID of the effective user for this access key
$assocId int The associated ID of the key
$expiryDays int The number of days before this key expires
Returns:
accessKey string The generated passkey

Definition at line 61 of file AccessKeyManager.inc.php.

References generateKeyHash(), Validation.generatePassword(), and Core.getCurrentDate().

AccessKeyManager.generateKeyHash ( key  ) 

Generate a key hash from a key.

Parameters:
$key string
Returns:
string

Definition at line 36 of file AccessKeyManager.inc.php.

Referenced by RegistrationHandler.activateUser(), and createKey().

& AccessKeyManager.validateKey ( context,
userId,
keyHash,
assocId = null 
)

Validate an access key based on the supplied credentials. If $assocId is specified, it must match the associated ID of the key exactly.

Parameters:
$context string The context of the access key
$key string The access key "passcode"
$assocId string optional assoc ID to check against the keys in the database

Definition at line 48 of file AccessKeyManager.inc.php.


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

Generated on Mon Jul 14 10:55:38 2008 for Open Journal Systems by  doxygen 1.5.6