Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Delphi Authentication mit Indy Http Client (https://www.delphipraxis.net/172954-authentication-mit-indy-http-client.html)

Shark99 30. Jan 2013 11:47

AW: Authentication mit Indy Http Client
 
Hast Recht! Es ist Digest. Wie verfahre ich nun?

mjustin 30. Jan 2013 11:55

AW: Authentication mit Indy Http Client
 
Zitat:

Zitat von Shark99 (Beitrag 1201311)
Hast Recht! Es ist Digest. Wie verfahre ich nun?

Dieser Thread hilft eventuell weiter:

http://forums2.atozed.com/viewtopic....20812&start=10

Shark99 30. Jan 2013 13:25

AW: Authentication mit Indy Http Client
 
Danke für den Tip, aber ich hab schon IdAllAuthentications in uses drin, und es klappt trotzdem nicht. :(

Shark99 1. Feb 2013 23:02

AW: Authentication mit Indy Http Client
 
Ich habe zwei Eventhandler hinzugefügt um besser zu erkennen was während des Connects passiert.
Delphi-Quellcode:
procedure Auth(Sender: TObject; Authentication: TIdAuthentication; var Handled: Boolean);
procedure AuthSelect(Sender: TObject; var AuthenticationClass: TIdAuthenticationClass; AuthInfo: TIdHeaderList);

...

IdHTTP1.OnAuthorization := Auth;
IdHTTP1.OnSelectAuthorization := AuthSelect;
Wenn OnSelectAuthorization ausgelöst wird

ist AuthenticationClass TIdDigestAuthentication,

AuthInfo hat den Inhalt:

Digest algorithm="MD5", realm="Forbidden", qop="auth", opaque="1f4ffff678e1ac3ca5a49a44001fb374", nonce="1b2a0979d3adff70d59e1d11f6315df1"

Jedoch wird OnAuthorization erst gar nicht ausgelöst!

mjustin 2. Feb 2013 10:19

AW: Authentication mit Indy Http Client
 
Auf Stackoverflow fand ich gerade einen ähnlichen Fall.

Aus der Antwort von Remy Lebeau:

Zitat:

You need to enable the hoInProcessAuth flag in the TIdHTTP.HTTPOptions property. It is disabled by default. Without that flag, TIdHTTP.Get() will not send a second HTTP request specifying the Digest credentials in reply to the server's 401 response. It will simply exit and expect you to handle the 401 response and send a new request yourself as needed.

Shark99 2. Feb 2013 10:38

AW: Authentication mit Indy Http Client
 
Das war ein Arbeitskollege! :) Es läuft nun!


Alle Zeitangaben in WEZ +1. Es ist jetzt 22:09 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz