Enumeration Case

URLSession.AuthChallengeDisposition.rejectProtectionSpace

Reject this challenge, and call the authentication delegate method again with the next authentication protection space. The provided credential parameter is ignored.

Declaration

case rejectProtectionSpace = 3

Discussion

The URLSession.AuthChallengeDisposition.rejectProtectionSpace disposition is only appropriate in fairly unusual situations. For example, a Windows server might use both NSURLAuthenticationMethodNegotiate and NSURLAuthenticationMethodNTLM. If your app can only handle NTLM, you would want to reject the Negotiate challenge, in order to then receive the queued NTLM challenge.

However, most apps won't face this scenario, and if you cannot provide a credential for a certain authentication method, you should usually fall back to the URLSession.AuthChallengeDisposition.performDefaultHandling disposition instead.