Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodiSSHGetAuthData.GetAuthData

function GetAuthData(const aUsername: string; const aMethod : string; aChange : Boolean = False) : tBytes;
Called by the password/public-key authentication methods to fetch the credential to send for aUsername: for aMethod = 'password' this returns the (UTF-8 encoded) password, honoring aChange to request a NEW password on a server-issued change request; for aMethod = 'publickey' it returns the public key blob to offer. On TstCustomSSHClient this is served from the Password property or the OnGetClientPassword event (password) or from ClientKey (publickey) - an application supplies credentials by setting those, not by calling GetAuthData itself.