2011-08-14 39 views
1

我有一個使用ADFS保護的Web應用程序,這是以前的NTLM。我們以前能夠使用ASIHTTPRequest類檢索數據,但它似乎不適用於ADFS。響應是重定向到登錄網址。iOS和ADFS保護的網站

這是從iOS連接到受ADFS保護的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); 
    } 
+0

你有沒有想過這個?我認爲Google Drive iPad應用存在這個問題,我想引導他們找到可行的解決方案。當我嘗試使用ADFS和集成的Windows身份驗證登錄到我的Google Apps域設置以進行SSO時,沒有任何反應。如果我將它切換到它的工作方式。 –

回答