Participating in AuthBrokerAgent workflow from CFNetwork?
Participating in AuthBrokerAgent workflow from CFNetwork?
- Subject: Participating in AuthBrokerAgent workflow from CFNetwork?
- From: Daniel Jalkut <email@hidden>
- Date: Mon, 05 Mar 2012 15:02:13 -0500
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