Indy 9 | Content | Index | Reference

TIdUserAccount
Hierarchy, Properties, Methods, Unit: IdUserAccounts
Implements a user account for use in Indy server implementations.

    TIdUserAccount = class(TCollectionItem)

Unit
IdUserAccounts
Description
TIdUserAccount is a TCollectionItem descendant that represents information about an account used on an Indy server. TIdUserAccount includes properties that identify the account and authentication password, and describe attributes associated with the user account. TIdUserAccount also includes methods that allow verification of a password against the stored password for the account.

TIdUserAccount is the class type used to represent entries in a TIdUserAccounts collection.

TIdUserAccount.Attributes
TIdUserAccount
Represents additional information for a user account.

    property Attributes: Tstrings;

Description
Attributes is a TStrings property that provides storage for additional information associated with a user account. Values are added to Attributes as individual strings in the familiar NAME=VALUE format.

TIdUserAccount does not specifiy the content or semantics for data in the Attributes property.

Use Data to store a TObject descendant that contains information for the user account.

TIdUserAccount.Data
TIdUserAccount
Stores an object instance to be used with the user account.

    property Data: TObject;

Description
Data is a public TObject property that provides storage for TObject and descendant classes to be used with the user account. Data is not maintained by TIdUserAccount, and it is the responsibility of the application to handle creating or freeing object instances stored in Data.

TIdUserAccount.Password
TIdUserAccount
Account credentials used for authenticating the user account.

    property Password: string;

Description
Password is a String property that represents the authentication credentials to use for the use account. Password is used in CheckPassword to verify that the supplied credentials match the Password for the user account.

TIdUserAccount.RealName
TIdUserAccount, See Also
Indicates the name of the user account owner.

    property RealName: string;

Description
RealName is a String property that represents the name associated with the owner of a user account.

Use UserName to get the value that identifies the account.

TIdUserAccount.UserName
TIdUserAccount, See Also
Represents the access identity for the user account.

    property UserName: string;

Description
UserName is a String property that represent the value to be used when accessing the user account. UserName is used with Password when performing account authentication.

Use RealName to get the textual name of the person that owns the user account.

Use Attributes to access additional information about the user account.

TIdUserAccount.CheckPassword
TIdUserAccount
Verifies that a value matches the stored password for the user account.

    function CheckPassword(const APassword: String): Boolean;

Parameters
const APassword: String
Authentication credentials to verify for the user account.
Return Value
Boolean - True when the value matches the stored password for the user account.
Description
CheckPassword is a Boolean function that verifies authentication credentials specified in APassword. CheckPassword compares the value in APassword to the Password property using the CaseSensitivePasswords setting from the TIdUserAccounts collection that owns the user account. CheckPassword returns True when the values match.

CheckPassword is used in TIdUserManager.AuthenticateUser to locate the user account and perform authentication using the specified identity and credentials.

TIdUserAccount.Create
TIdUserAccount, See Also
Constructor for the object instance.

    constructor Create(ACollection: TCollection); override;

Parameters
ACollection: TCollection
Owner of the object instance.
Description
Create is the constructor for the object instance. Create calls the inherited Create method using ACollection as the owner of the object instance. Create also allocates resources needed for the Attribute property.

TIdUserAccount.Destroy
TIdUserAccount, See Also
Frees an object instance.

    destructor Destroy; override;

Description
Destroy is the destructor for the object instance. Destroy frees and releases resources allocated in the Create method, including Attributes. Destroy calls the inherited Destroy method prior to exiting.

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.