Search results for

ASWebAuthenticationSession cookie

1,295 results found

Post

Replies

Boosts

Views

Activity

Reply to Access HTTPOnly cookies with iOS action extension
Hey ,I am also facing the alike Issue, I need to acess all the cookies of the browser and document.cookies return cookies only of the tab in which I am working, chrome and mozilla provides api's , chrome.cookies provides all the cookies available in browser chrome, also nsIcookieManager provides all cookies of mozilla bowser,but I am stuck with safari. Is there any API aviablable or is it impossible for javascript to do that.did you find any solution to it?
Topic: Safari & Web SubTopic: General Tags:
Mar ’16
NSURLSession
NSURLSessionを使用してWKWebViewにてダウンロードリンクをクリックしたときのダウンロード機能を実装していますが、ダウンロードがうまくいかないときがあります。下記コードについてダウンロードを成功させるための解決方法を教えてください。ダウンロード成功時のurlString:http://172.27.32.xxx/test.txtダウンロード失敗時のurlString:http://172.27.32.175/?template=MessageFileRawScreen&entityid=58081&attachmentIndex=3381&f=test.txt※上記についてはどちらもsafari(標準ブラウザ)からのアクセスでダウンロード(共有)できることの確認をしています。 NSURL *downloadURL = [NSURL URLWithString:urlString]; NSMutableURLRequest *request =[NSMutableURLRequest requestWithURL:downloadURL]; NSArray *cookies =[[NSHTTPCookieStorage sharedHTTPCookieStorage]cookiesForURL:downloadURL]; NSDictionary *header = [NSHTTPCookie requestHeaderFieldsWithCookies:cookies]; [request setAllHTTPHeaderFields:header]; NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; [cookieStorage.cookies enumerateObjectsUsingBlock:^(NSHTTPCookie *cookie, NSUInteger idx, BOOL *stop) { NSLog(@cookie properties: %@, cookie.properties); }]; self.downloadTask = [self.session downloadTaskW
0
0
643
Mar ’16
NSURLSession and NSURLResponse and cookie
NSURLSessionを使用して、バックグラウンドでのダウンロードを実装する際に、URLSession:downloadTask:didFinishDownloadingToURLを用いて実装しています。cookieをGET要求のレスポンスから取得して、requestに付与したいのですが、バックグラウンドでのダウンロードを実装する際のNSURLSessionを用いたNSURLResponseの取得方法とcookieの付与方法について教えてください。取得と付与のサンプルコードを提示していただけると助かります。
0
0
281
Mar ’16
WKWebview and cookie
WKWebviewで表示しているウェブページでhtmlまたはjavascript、javaで作成されたcookieを取得することは可能でしょうか?cookieがWebviewの外で作成されていると思うのですが、その場合のcookieの取得方法を教えてください。サンプルコードがあれば教えてください。
0
0
704
Mar ’16
API Error and Approval Process
I started submitting articles on Tuesday for Apple News and they were immediately put on hold pending approval.That approval has never come and now I am getting an error message saying there is an API error. Meanwhile, articles are piling up.First, what does the approval process entail? There is nothing from Apple, and no expectation were set. Meanwhile, the RSS feed has stopped refreshing the Apple News content. (Is the best way to proceed is to simply stop using the Apple News Format and go back to RSS feeds?)Update: this is what I got from Apple:Array( [headers] => Array ( [www-authenticate] => HHMAC [content-type] => application/json; charset=UTF-8 [content-length] => 39 [connection] => keep-alive ) [body] => {errors:[{code:WRONG_SIGNATURE}]} [response] => Array ( [code] => 401 [message] => Unauthorized ) [cookies] => Array ( ) [filename] =>)
2
0
885
Mar ’16
NSURLSession loses cookies on redirect using the Background configuration
NSURLSession seems to ignores cookies when following a redirect when configured with backgroundSessionConfigurationWithIdentifier().I have tested this on iOS 8.4 and iOS 9.3.Has anybody else seen this behaviour?My use of NSURLSession works fine when using the defaultSessionConfiguration(), but fails to store a authentication cookie that is delivered as part of a redirect when configured with the background. The cookie has the Secure flag set, and is delivered as part of a HTTPS session.As I said, the code does work with the default config but fails using the background configuration. This is true when the iOS app is in the foreground or the background.The docs state that redirects in the background are followed automatically without waking the app. Could this part of iOS be forgetting to read the Headers for cookies?Any ideas??
3
0
2.7k
Mar ’16
Reply to NSURLSession loses cookies on redirect using the Background configuration
Has anybody else seen this behaviour?Yes. This is a known bug (r. 16,852,027).In many cases it’s possible to work around this but the best way of doing that depends on your specific circumstances. For example, one option is to use a standard session to run the initial request, not follow the redirect, grab the cookies from the redirect response, and then issue a request in the background session for the target URL with those cookies.Share and Enjoy — Quinn “The Eskimo!” Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Mar ’16
Cookie sharing between NSURLSession and WKWebView?
Several people out there are reporting this as a bug. I am not sure it is.I am using iOS 9.3, Xcode 7.3Previously, I was using UIWebView to access a log in page (we use shibboleth), which stored the authentication cookies in NSHTTPCookieStorage.sharedHTTPCookieStorage()Using UIWebView, this played nicely with NSURLSession when accessing web services as they shared the same cookie storage.I have now tried switching to MKWebView as suggested in the documentation, and this process no longer seems to work. I can only assume cookie storage is sandboxed.Is there a documented way to share cookies between MKWebView and NSURLSession?
Topic: UI Frameworks SubTopic: AppKit Tags:
0
0
2.5k
Apr ’16
NSURLSession single sign on cookie missing in Watchkit2
we encountered a strange problem when using NSURLSession with watchkit 2, ios 9.0.most headers and cookies are returned from the server (using HTTPS)but the single sign on cookie is missingwhen running the exact same code in an iphone application (request via NSURLSession) the cookie is visible in the shared cookie storage.I've read alot of posts on how to add headers via the HTTPAdditionalHeaders, but this specific cookie should have been returned from the serverwhy would one specific cookie go missing while the others are returned?
3
0
1.5k
Apr ’16
wkwebview & cookies
Hi there,can I manage cookies programmatically in WKWebView in iOS 9 with override WKWebsiteDataStore or another ones?Can you help me? Also can I create custom storage instead of defaultDataStore? I inherit from WKWebsiteDataStore & create custom class but I'm getting access error in lineconfiguration.websiteDataStore = customStore;WKWebView* wkWebView = [[WKWebView alloc] initWithFrame:frame configuration:configuration];
1
0
993
Apr ’16
Reply to NSURLSession single sign on cookie missing in Watchkit2
We found the problem. This specific cookie was added in a redirect.When running via Watchkit, the header did not include the set-cookie header, even thought the additional cookie was returned in the response.Again - the strange thing was that this works perfect when running via iphone app and widget.Could it be that via watch the request is running in a 'background' mode (similar to an app in the background) hence the difference? I've read that there's a know bug when running NSURLSession requests when the app is in the background but I'm not really sure of the nature of the bug.Any comments would be great.
Topic: App & System Services SubTopic: General Tags:
Apr ’16
How to play a secure video using CouldFront?
Hello,I have a question regarding playing a video using CouldFront, how can I secure the videos on iOS? Because CloudFront supports only two methods: signed cookie and signed URL. From your documentation signed cookie doesn’t work on iOS and signed URL doesn’t help me because HLS references refers to other resources that needs to be signed as well.Regards,Gabriel Petrescu
1
0
2.7k
Apr ’16