File 'net/adb.cls' (part of 'Pool_Net')


Home | Packages | Files | Procedures | Classes | Keywords | External packages


Written by
Andreas Kupries
Description
Management of a database to map from users to authentication codes (passwords) and storage references. Complete definition.
Keywords
User authentication, authentication database, user database, passwords

Class 'aDB'

Description
A file based implementation of the interface as defined by userdbBase.
Superclasses
userdbBase
Membervariables
externalFile, user
Methods
add, isRegistered, lookup, read, remove, rename, save, who

externalFile
The name of the last file used as argument to read. Used by save if called without or empty argument.
user
The in-memory database. It is indexed by user names and maps them to 2-element lists containing the associated password and storage reference, in this order.

add (usrName pwd storage)

Add the user usrName to the database, together with its password and a storage reference. The latter is stored and passed through this system without interpretation of the given value.
Argument: usrNameThe name of the user defined here.
Argument: pwdPassword given to the user.
Argument: storagesymbolic reference to the maildrop of user usrName. Usable for a storage system only.

isRegistered (usrName)

Determines wether user usrName is registered or not.
Argument: usrNameThe name of the user to check for.

lookup (usrName)

Query database for information about user usrName. Overrides userdbBase:lookup.
Argument: usrNameName of the user to query for.
Returns: a 2-element list containing password and storage reference for user usrName, in this order.

read (file)

Reads the contents of the specified file into the in-memory database of users, passwords and storage references.
Notes: The name of the file is remembered internally, and used by save (if called without or empty argument).
Argument: fileThe name of the file to read.

remove (usrName)

Remove the user usrName from the database.
Argument: usrNameThe name of the user to remove.

rename (usrName newName)

Renames user usrName to newName.
Argument: usrNameThe name of the user to rename.
Argument: newNameThe new name to give to the user

save (file)

Stores the current contents of the in-memory user database into the specified file.
Argument: file (= {})The name of the file to write to. If it is not specified, or as empty, the value of the member variable externalFile is used instead.

who ()

Determines the names of all registered users.
Returns: A list containing the names of all registered users.


Generated by AutoDoc 2.1 at 02/20/1999, invoked by Andreas Kupries