Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

NTLM authentification loses POST body

I'm trying to send requests to web-service with NTLM authentification by standart way:

-(void)connection:(NSURLConnection*)connection
willSendRequestForAuthenticationChallenge:(
NSURLAuthenticationChallenge*)challenge{ if([challenge previousFailureCount]>0){ [[challenge sender] cancelAuthenticationChallenge:challenge]; }else{ NSURLCredential*cred =[NSURLCredential credentialWithUser:username
password
:password
persistence
:NSURLCredentialPersistenceForSession]; [[challenge sender] useCredential:cred forAuthenticationChallenge:challenge]; }
}

GET requests works fine, but there is problem with POST requests. NTLM handshake process loses POST data. It looks like this:

1: iOS  -->Web  POST {body JSON}2: iOS <--
Web 401Unauthorized WWW-Authenticate: NTLM3: iOS -->Web POST (empty POST request,no body data!) Authorization: NTLM <base64-encoded type-1-message>4: iOS <--
Web 401Unauthorized WWW-Authenticate: NTLM <base64-encoded type-2-message>5: iOS -->Web POST (empty POST request,no body data!) Authorization: NTLM <base64-encoded type-3-message>6: iOS <--
Web 500InternalError(it
's normal, because body is empty)

Any ideas?

Posted on May 5, 2015 6:22 AM

Reply
3 replies

NTLM authentification loses POST body

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.