Open Journal Systems  2.4.4
 All Classes Namespaces Functions Variables Groups Pages
AccessKeyManager Class Reference

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

Definition at line 18 of file

Member Function Documentation

AccessKeyManager::_performPeriodicCleanup ( )

Periodically clean up expired keys.

Definition at line 78 of file

References DAORegistry\getDAO().

Referenced by AccessKeyManager().

AccessKeyManager::AccessKeyManager ( )

Constructor. Create a manager for access keys.

Definition at line 25 of file

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

AccessKeyManager::createKey (   $context,

Create an access key with the given information.

$contextstring The context of the access key
$userIdint The ID of the effective user for this access key
$assocIdint The associated ID of the key
$expiryDaysint The number of days before this key expires
accessKey string The generated passkey

Definition at line 60 of file

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

AccessKeyManager::generateKeyHash (   $key)

Generate a key hash from a key.


Definition at line 35 of file

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

& AccessKeyManager::validateKey (   $context,
  $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.

$contextstring The context of the access key
$keystring The access key "passcode"
$assocIdstring optional assoc ID to check against the keys in the database

Definition at line 47 of file

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