The wwUserSecurity class provides a base interface for implementing FoxPro table and Windows Auth user authentication. The class includes user retrieval and non-visual management features like adding deleting etc.
wwUserSecurity
Class Members
Member | Description | |
---|---|---|
Authenticate |
o.Authenticate(lcUsername, lcPassword) |
|
AuthenticateNt |
Authenticates username and password against Windows System accounts. o.AuthenticateNt(lcUsername,lcPassword) |
|
Close |
Closes the user file. o.Close() |
|
CreateTable |
o.CreateTable(lcFileName) |
|
DeleteUser |
Deletes the currently selected user. o.DeleteUser() |
|
FixupTable |
Method used to fix up the wwUserSecurity table by stripping trailing spaces from text fields and encoding all passwords if o.FixupTable() |
|
GetPasswordHash |
Retrieves a password hash from an unenrypted string/password value. This method is used internally to encrypt passwords during Save operations. By default this method looks for a ~~ postfix and if it finds it uses that value as a hash. The o.GetPasswordHash(lcPassword,llForce) |
|
GetUser |
Retrieves a user into the oUser member based on a PK or Username and Password lookup. GetUser always sets the oUser member even on failure in which case the value is set to an empty object. o.GetUser(lcPK, lcPassword) |
|
GetUserByUsername |
Like the GetUser() method but retrieves a user by username rather than by PK. o.GetUserByUsername(lcUsername) |
|
GetUserByValidationKey |
Retrieves a user by the o.GetUserByValidationKey(lcValidate) |
|
IsEmpty |
Determines whether a user has been loaded into the Checks whether the o.IsEmpty() |
|
NewUser |
Creates a new user record and stores it in the `.oUser` member data and returns the `.oUser` as a result. o.NewUser() |
|
Open |
Opens the user file and/or selects it into cAlias. If the table is already open this method only selects the Alias. o.Open(lcFileName, llReOpen, llSilent) |
|
Reindex |
Reindexes and compacts the user table. o.Reindex() |
|
SaveUser |
Saves the currently active user to file. Saves the oUser member to the database. o.SaveUser() |
|
calias |
Alias of the user file. | |
cdomain |
Domain name when using NT Authentication for request. | |
cerrormsg |
Holds error messages when lError = .T. or when any methods return False. | |
cfilename |
Filename for the user file. | |
cPasswordEncryptionKey |
Encryption key string that's used to hash the password stored in the The value is hashed when a user is saved via the |
|
lcasesensitive |
Determines wheter usernames and passwords are case sensitive. The default is .F. | |
lerror |
Error Flag. True when an error occurs during any operation. Set but not required as most methods return True or False. | |
lRequireValidation |
||
ndefaultaccounttimeout |
The default value when the account should time out in days. Leave this value at 0 to force the account to never timeout. | |
nminpasswordlength |
Minimum length of the password. | |
oUser |
Requirements
Assembly: wwUserSecurity.prg© West Wind Technologies, 1996-2024 • Updated: 01/31/17
Comment or report problem with topic