Re: NSURLDownload and http proxy username/password
Re: NSURLDownload and http proxy username/password
- Subject: Re: NSURLDownload and http proxy username/password
- From: Elliott <email@hidden>
- Date: Wed, 22 Jun 2011 12:09:39 -0700 (PDT)
That sounds useful, but the bigger problem I'm having is getting the username and password of the proxy from the System Preferences/Keychain. I tried getting the credentials using NSURLCredentialStorage but it's empty. Is there a way to get this information first?
--- On Wed, 6/22/11, Mark Pauley <email@hidden> wrote:
> From: Mark Pauley <email@hidden>
> Subject: Re: NSURLDownload and http proxy username/password
> To: "Elliott" <email@hidden>
> Cc: email@hidden
> Date: Wednesday, June 22, 2011, 11:32 AM
> Have you taken a look at
> NSURLCredentialStorage?
>
> http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSURLCredentialStorage_Class/Reference/Reference.html
>
> That's the preferred way of storing creds in the
> keychain. In the event that there is no default cred
> in the storage, you'll need to put up an auth dialog.
> Just make sure you store the credential you get from the
> dialog in your credential storage.
>
>
> On Jun 22, 2011, at 10:09 AM, Elliott wrote:
>
> > I'm still trying to get NSURLDownload working with
> username and password. I have it working without
> username and password, but when I add a username and
> password and proxy server requires password, it doesn't work
> automatically.
> >
> > I tried removing my delegate's
> didReceiveAuthenticationChallenge to see if it would be
> handled automatically and it doesn't work. I re-added
> this and trace through it and see that the proposed
> credential is NULL in the passed challenge. I
> hardcoded the username and password for the proxy and pass
> this via NSURLCredential's credentialWithUser: and it does
> work.
> >
> > Do I need to use (credentialWithUser: password:
> persistence: ) to create the NSURLCredential? If so,
> how do I get the username and password?
> >
> > I do see in Safari that it brings up a keychain dialog
> to access the information. I found the item in the
> keychain. Should I try to access this directly?
> >
> > Thanks,
> > Elliott
> > _______________________________________________
> > 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