• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSURLSession delegate, Kerberos, and NSURLAuthenticationMethodNegotiate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSURLSession delegate, Kerberos, and NSURLAuthenticationMethodNegotiate


  • Subject: NSURLSession delegate, Kerberos, and NSURLAuthenticationMethodNegotiate
  • From: Wim Lewis <email@hidden>
  • Date: Tue, 08 Dec 2015 12:18:00 -0800

I'm trying to figure out what the right behavior of an NSURLSession delegate is to support Kerberos authentication. In particular, what does it expect of the credential that you give it with NSURLSessionAuthChallengeUseCredential?

A common situation is for a server to want to accept kerberos tickets from users that have them, or passwords from users that don't. The HTTP 4xx response offers both the Negotiate and Basic/Digest auth methods.

The URL subsystem documentation is pretty lacking. Experimentally, what I've found is:

   - Returning PerformDefaultHandling allows Kerberos to continue, but if the user isn't using Kerberos, it prevents any other authentication method from being considered.
   - Returning RejectProtectionSpace allows password authentication to happen, but prevents kerb auth.
   - Returning UseCredential with an arbitrary, garbage-value password credential appears to allow kerb tickets to be used; if I then return RejectProtectionSpace for any callbacks with a previous failure count, then I can get NSURLSession to do the right thing.

But I'm a bit concerned about the dummy credential I'm passing in. Can anyone clarify what NSURLSession does with it? And why doesn't PerformDefaultHandling fall back properly when a user has no kerberos tickets?



 _______________________________________________
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


  • Follow-Ups:
    • Re: NSURLSession delegate, Kerberos, and NSURLAuthenticationMethodNegotiate
      • From: "Quinn \"The Eskimo!\"" <email@hidden>
  • Prev by Date: Re: Canceling and then retrying a bunch of tasks
  • Next by Date: Re: Canceling and then retrying a bunch of tasks
  • Previous by thread: Re: Canceling and then retrying a bunch of tasks
  • Next by thread: Re: NSURLSession delegate, Kerberos, and NSURLAuthenticationMethodNegotiate
  • Index(es):
    • Date
    • Thread