1

I have a web application that is protected using ADFS, this was previously NTLM. We used to be able to retrieve data using the ASIHTTPRequest classes, but it does not appear to work with ADFS. The response is a redirect to the login url.

Is this the correct method of connecting from iOS to a ADFS protected URL?

    NSURL *url = [NSURL URLWithString:@"https://URL_TO_WCF_SERVICE"];

    ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
    [request addRequestHeader:@"Authorization" value:[NSString stringWithFormat:@"Basic %@",[ASIHTTPRequest base64forData:[[NSString stringWithFormat:@"%@:%@",userName, password] dataUsingEncoding:NSUTF8StringEncoding]]]];
    [request startSynchronous];
    NSError *error = [request error];
    if (!error) {
        NSString *response = [request responseString];
        NSLog(@"%@", response);
    }
Steve
  • 1,201
  • 8
  • 14
  • Did you ever figure this out? I think the Google Drive iPad app has this problem and I'd like to direct them to a possible solution. When I try to login to my Google Apps domain setup for SSO using ADFS and integrated windows authentication nothing happens. If I switch it to forms it works. – Brian Cauthon Oct 24 '12 at 01:06

1 Answers1

0

It might be related to Extended Protection. See NTLM authentication to AD FS for non-IE browser without 'Extended Protection' switched off? for more info.

HTH!

Community
  • 1
  • 1
Travis Spencer
  • 2,231
  • 16
  • 26