Jump to content
msd

Delphi & HTTP Authentication: Basic and Digest Access Authentication

Recommended Posts

Hello, 

 

I have one small question for Delphi network experts.

I need a source for Auth Digest for HikVision devices, and I will post a sample below.

 

GET /ISAPI/Event/notification/alertStream HTTP/1.1 Authorization: Digest

username="admin",

realm="IP Camera(C2183)",

nonce="4e5468694e7a42694e7a4d364f4449354d7a6b354d54513d",

uri="/ISAPI/Event/notification/alertStream",

cnonce="3d183a245b8729121ae4ca3d41b90f18", nc=00000001,

qop="auth",

response="f2e0728991bb031f83df557a8"

Host: 10.6.165.192

 

Thanks for any help in advance...

Share this post


Link to post

Assuming you've missed a newline after http/1.1, this looks is standard authentication, any proper library should handle it, ICS certainly should.

 

Angus

 

Share this post


Link to post

I'm using Indy with the latest Delphi version, and I have DevArt SecureBridge as another VCL for the network app...

It is not a problem if you have any advice from another VCL, but I try to pack all of my work in those two component sets.

 

Thanks for the help and assistance...

 

P.S. I'm using HikVision camera as HTTP client/server device.

Edited by msd

Share this post


Link to post

Indy's TIdHTTP component supports Digest, just make sure the IdAuthenticationDigest unit is in your uses clause (directly, or via the IdAllAuthentications unit) . And then you can set the TIdHTTP.Request.Username and TIdHTTP.Request.Password as needed. 

Edited by Remy Lebeau
  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×