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

Description (short)
User authentication database
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
Methods
public
add (usrName pwd storage)
isRegistered (usrName)
lookup (usrName)
read (file)
remove (usrName)
rename (usrName newName)
save (file)
who ()
Membervariables
public
user
externalFile

Methods

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: usrName The name of the user defined here.
Argument: pwd Password given to the user.
Argument: storage symbolic reference to the maildrop of user usrName. Usable for a storage system only.

isRegistered (usrName)

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

lookup (usrName)

Overrides userdbBase:lookup
Query database for information about user usrName. Overrides userdbBase:lookup.
Argument: usrName Name 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: file The name of the file to read.

remove (usrName)

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

rename (usrName newName)

Renames user usrName to newName.
Argument: usrName The name of the user to rename.
Argument: newName The 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.


Membervariables

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.
externalFile
The name of the last file used as argument to read. Used by save if called without or empty argument.

Generated by AutoDoc 2.4 at 09/14/2000, invoked by Andreas Kupries