hyyly / csexwb2

Automatically exported from code.google.com/p/csexwb2
0 stars 0 forks source link

How to get the info if Http authentication was successful? #26

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi! don't know if that's really an issue or not.. maybe I just don't know
how to do it .. please help! thank you

Original issue reported on code.google.com by david.kr...@gmail.com on 30 Jan 2008 at 12:14

GoogleCodeExporter commented 9 years ago
Hi,

Could you explain what *info* are you attempting to retreive after a 
successfull 
http authentication? Headers, document, ...?

BTW, this is not an issue, rather a question. Please post your questions in the 
discussion group http://groups.google.com/group/csexwb

Regards,

MH

Original comment by mehr...@gmail.com on 30 Jan 2008 at 12:26

GoogleCodeExporter commented 9 years ago
Hi! sorry.. Yes I will post elsewhere in the future.. now let me just explain 
what I
ment.. Actually I wanted to know IF the auth succeeded... I solved it in the
following way (don't know if there's a better solution).. I just observe the 
headers
returned after the username/pass is sent over..void
browser_ProtocolHandlerOnResponse(object sender,
csExWB.ProtocolHandlerOnResponseEventArgs e)
        {
            if (authInProgress)
            {
                if (e.m_ResponseHeaders.Contains("Authorization Required"))
                {
                    //authorization failed
                    OnAuthResult(false);
                }
                else
                {
                    //succeess !
                    OnAuthResult(true);
                }

                authInProgress = false;
            }
        }

Original comment by david.kr...@gmail.com on 31 Jan 2008 at 10:28