Andrea Lai
Andrea Lai
unit Horse.BasicAuthentication; {$IF DEFINED(FPC)} {$MODE DELPHI}{$H+} {$ENDIF} interface uses {$IF DEFINED(FPC)} SysUtils, base64, Classes, {$ELSE} System.SysUtils, System.NetEncoding, System.Classes, {$ENDIF} Horse, Horse.Commons; const AUTHORIZATION = 'Authorization'; REALM_MESSAGE = 'Enter credentials'; type...
An example, use the authorization method. function DoBasicAuthentication(const Username, Password: string; Req: THorseRequest): Boolean; var Users: TServiceUsers; Config: TConfigLogin; begin Users := TServiceUsers.Create; try {$IFDEF HORSE_APACHE} var sx : String...
[Horse.BasicAuthentication.zip](https://github.com/HashLoad/horse/files/9252210/Horse.BasicAuthentication.zip) Ok, I attach the file here.