Einzelnen Beitrag anzeigen

generic

Registriert seit: 24. Mär 2004
Ort: bei Hannover
2.415 Beiträge
 
Delphi XE5 Professional
 
#3

Re: UrlDownloadToFile im Apache Real authorisieren

  Alt 16. Nov 2008, 13:33
Ich habe keine Ahnung was eine ".htpasswd-Real-basierte" Methode ist.

Du kannst aber eine Basic Auth machen.
Dazu trägst du einfach in die .htacccess Datei folgendes sein:
Code:
AuthType Basic
AuthName "hallo die welt"
AuthBasicProvider file
AuthUserFile .htusers
Require valid-user
Dann erstellst du mit dem Tool htpasswd oder htpasswd2 die .htusers Datei.
Code:
Usage:
        htpasswd [-cmdpsD] passwordfile username
        htpasswd -b[cmdpsD] passwordfile username password

        htpasswd -n[mdps] username
        htpasswd -nb[mdps] username password
 -c Create a new file.
 -n Don't update file; display results on stdout.
 -m Force MD5 encryption of the password.
 -d Force CRYPT encryption of the password (default).
 -p Do not encrypt the password (plaintext).
 -s Force SHA encryption of the password.
 -b Use the password from the command line rather than prompting for it.
 -D Delete the specified user.
On Windows, NetWare and TPF systems the '-m' flag is used by default.
On all other systems, the '-p' flag will probably not work.
Fertig

Für die Delphi Seite müsstest du uns noch mitteilen, mit welchen Komponenten du auf die Webseite zugreifst.
Bei den Indy's gibt es Eigenschaften und Ereignisse für das.
Coding BOTT - Video Tutorials rund um das Programmieren - https://www.youtube.com/@codingbott
  Mit Zitat antworten Zitat