Alin Constantin
2005-07-23 20:08:27 UTC
Hi,
Is there any way to obtain (on the client machine) the name of the
authenticated user on the server/proxy?
I'm thinking of these situations:
- a http request is issued, the server requires integrated Windows
authentication. Sometimes either credentials of the user logged on on the
client machine or some cached credentials are used, and the the connection
"just works". How do I find out which username's credentials were used?
- sometimes, the response from the http request can be HTTP_STATUS_DENIED or
HTTP_STATUS_PROXY_AUTH_REQ. InternetErrorDlg() is used to request new
credentials from the user. How do I found what was the user's input for
username?
I thought that InternetQueryOption() could be used to ask for
INTERNET_OPTION_USERNAME or INTERNET_OPTION_PROXY_USERNAME on the
connection's handle.
However, I tried this and although the function succeeds, only empty strings
are returned...
Is there any other way of obtaining the connected user's name?
Thank you,
Alin
Is there any way to obtain (on the client machine) the name of the
authenticated user on the server/proxy?
I'm thinking of these situations:
- a http request is issued, the server requires integrated Windows
authentication. Sometimes either credentials of the user logged on on the
client machine or some cached credentials are used, and the the connection
"just works". How do I find out which username's credentials were used?
- sometimes, the response from the http request can be HTTP_STATUS_DENIED or
HTTP_STATUS_PROXY_AUTH_REQ. InternetErrorDlg() is used to request new
credentials from the user. How do I found what was the user's input for
username?
I thought that InternetQueryOption() could be used to ask for
INTERNET_OPTION_USERNAME or INTERNET_OPTION_PROXY_USERNAME on the
connection's handle.
However, I tried this and although the function succeeds, only empty strings
are returned...
Is there any other way of obtaining the connected user's name?
Thank you,
Alin