HTTP Authentication with HttpLogin()

The proxy's Login method provides a mechanism for negotiating HTTP logins.

lcUserName = "user"
lcPassword = "sekret"
llPreAuth = .F.
loProxy.oService.HttpLogin(lcUsername, lcPassword,llPreAuth)

HTTP logins execute Basic, Digest or Windows Authentication scenarios for standard HTTP 401 status code login semantics. The Login method takes three parameters: Username, password and PreAuthenticate.

If you specify username and password those are applied using Web authenticatation. You can also use your default Windows Authentication credentials by setting the username to "Windows" and password blank.

PreAuthenticate
Some web sites require you to authenticate immediately and don't offer a password challenge first. Setting PreAuthenticate to .t. sends the username and password immediately rather than only after a password challenge from the server. Generally this flag shouldn't be necessary but you can use it for some services that don't actually issue the challenge first (mostly for Basic Authentication services).


© West Wind Technologies, 2004-2020 • Updated: 09/29/15
Comment or report problem with topic