IHYLoginForm

Overview

The IHYLoginForm interface used by the THYUserProfile class to get access to a login details.

Use Cases

If THYUserProfile is used to control user login procedure it can use a custom form to display login prompt. This login form must implement IHYLoginForm interface to allow THYUserProfile to get login details. To see this in action, please take a look at the Security sample that is shipped with Hydra.

  TLoginForm = class(TForm, IHYLoginForm)
  [...]
  protected
    { IHYLoginForm }
    function GetUserID : string;
    procedure SetUserID(Value : string);
    function GetPassword : string;
    procedure SetPassword(Value : string);

function TLoginForm.GetPassword: string;
begin
  result := ePassword.Text
end;

function TLoginForm.GetUserID: string;
begin
  result := eUserID.Text
end;

procedure TLoginForm.SetPassword(Value: string);
begin
  ePassword.Text := Value
end;

procedure TLoginForm.SetUserID(Value: string);
begin
  eUserID.Text := Value
end;

[...]

procedure TMainData.DoLogin;
begin
  UserProfile.Login(TLoginForm);
end;

Location

 

GetPassword

Getter method for the Password property.

function GetPassword: string

GetUserID

Getter method for the UserId property.

function GetUserID: string

Password

Gets or sets user password.

property Password: string read write

SetPassword

Setter method for the Password property.

procedure SetPassword(Value: string)

Parameters:

  • Value: Password value.

SetUserID

Setter method for the UserId property.

procedure SetUserID(Value: string)

Parameters:

  • Value: User identifier.

UserID

Gets or sets user identifier.

property UserID: string read write

 

Password

Gets or sets user password.

property Password: string read write

UserID

Gets or sets user identifier.

property UserID: string read write

 

GetPassword

Getter method for the Password property.

function GetPassword: string

GetUserID

Getter method for the UserId property.

function GetUserID: string

SetPassword

Setter method for the Password property.

procedure SetPassword(Value: string)

Parameters:

  • Value: Password value.

SetUserID

Setter method for the UserId property.

procedure SetUserID(Value: string)

Parameters:

  • Value: User identifier.