Re: Participating in AuthBrokerAgent workflow from CFNetwork?
Re: Participating in AuthBrokerAgent workflow from CFNetwork?
- Subject: Re: Participating in AuthBrokerAgent workflow from CFNetwork?
- From: Mark Pauley <email@hidden>
- Date: Mon, 05 Mar 2012 13:33:15 -0800
AuthBrokerAgent is currently NSURLConnection only :(
With the stream API, the idea is that you have utter control over all aspects of the exchange and are responsible for making everything happen.
If you open the ark and gaze at CFHTTPRequest / Stream, be prepared to feel some tingling, melty sensations in your facial area.
_Mark
On Mar 5, 2012, at 12:02 PM, Daniel Jalkut wrote:
>
> I notice that if I use NSURL-level APIs to access network resources via an authenticated proxy server, the system is smart enough to not only fetch the keychain-stored credentials for the server, but, if those credentials don't work, it goes a step further and prompts the user for the authentication details:
>
> https://skitch.com/danielpunkass/88kb7/usernotificationcenter
>
> My best guess so far is this dialog is presented by the UserNotificationCenter on behalf of AuthBrokerAgent, which is invoked from the CFNetwork layer in the HTTP networking code:
>
> #0 0x00007fff91c3067a in mach_msg_trap ()
> #1 0x00007fff91c2fd71 in mach_msg ()
> #2 0x00007fff8b74b99b in _AuthBrokerReceiveCredentials ()
> #3 0x00007fff8b74c0d7 in _AuthBrokerClearAuthentication ()
> #4 0x00007fff8b70f4a0 in HTTPProtocol::askAuthBrokerForCreds ()
> #5 0x00007fff8b70fee5 in HTTPProtocol::_CFHTTPProtHasCredentialsForChallenge ()
> #6 0x00007fff8b71008c in HTTPProtocol::attemptAuthentication ()
> #7 0x00007fff8b66a505 in HTTPProtocol::performHeaderRead ()
> #8 0x00007fff8b66a32b in HTTPProtocol::httpReadStreamEvent ()
>
> So, drum roll please, is there any way I can configure my own CFNetwork HTTP messages to perform this kind of "askAuthBrokerForCreds" behavior for my requests?
>
> Daniel
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Macnetworkprog mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden