Search results for

ASWebAuthenticationSession cookie

1,295 results found

Post

Replies

Boosts

Views

Activity

Reply to Support file downloading in WKWebView
Hello,Thanks for your answers.Now I'm able to get the right URL to file from request in delegate method and then create a URLSession to download file but I've found another problem.The URLSession is not able to download file because of missing session. I'm using WKWebView and it seems that the cookies are not stored in cookie storage so the URLSession get a login page instead of file.Is there any way to get cookies from WKWebView to use by URLSession? I was trying to get cookies from response header but without success.BR,Pawel
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’17
Reply to Support file downloading in WKWebView
The URLSession is not able to download file because of missing session.Right. This is a common problem, so common that WKWebView in the current beta OSes (iOS 11 beta and so on) includes a new API to get at the required cookies. You can learn more about this in WWDC 2017 Session 220 Customized Loading in WKWebView.On current OS releases your options depend on whether the cookie is flagged as HttpOnly or not: If it’s not HTTP only, you can get the cookie by executing JavaScript within the web view to access the document.cookies DOM property.If it is HTTP only, things get much more ‘fun’.Share and Enjoy — Quinn “The Eskimo!” Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’17
how to redirecting outgoing network traffic in kernel
How do I change the destination IP address in the kernel?there is my code,but it doesn't work.is there something wrong ,pls tell me? tksstatic errno_t ipf_attach(void){ errno_t err = 0; struct ipf_filter ipfv4; bzero(&ipfv4, sizeof(struct ipf_filter)); ipfv4.cookie = (caddr_t)&ipf_v4; ipfv4.name = MYBUNDLEID; ipfv4.ipf_input = ipf_input; ipfv4.ipf_output = ipf_output; ipfv4.ipf_detach = ipf_detach; err = ipf_addv4(&ipfv4, &ipf_v4); if(err) return err; } static errno_t ipf_output(void *cookie, mbuf_t *data,ipf_pktopts_t options){ errno_t retval = 0; if(cookie == &ipf_v4){ struct ip *ip = (struct ip *)mbuf_data(*data); if(ip != NULL){ if(ip->ip_p != IPPROTO_TCP) return retval; struct tcphdr *tcp = (struct tcphdr *)((uint8_t *)ip + sizeof(struct ip)); short dport = ntohs(tcp->th_dport); if((dport == 80 || dport == 8080 ) ){ if(ipf_agent_http_addr == 0) return retval; if(ipf_agent_http_addr != ip->ip_src.s_addr && ipf_agent_http_addr != ip->ip_dst
1
0
404
Jul ’17
SFSafariWebViewController & privacy
We are working on a project which involves having App A do single sign-on for App B. App A wants to share state with App B. In iOS10, we were planning to use the SFSafariWebViewController for App A to point to an endpoint and set a cookie. Since the cookie in SFSafariWebViewController can be shared with native Safari, App B can open up SFSafariWebViewController instance and point to the same endpoint and the cookie would be picked up and send to the server. This would allow App A to authenticate the user and to set a cookie, such that App B can hit the same endpoint and pass the cookie over as proof of authentication.According to WWDC 17 Session 225, IOS 11 changes the behaviour of the SFSafariWebViewController and the Safari app, to keep persisted data within the scope of the app , e.g. no cookie sharing. With this change, we are no longer able to share state between two apps. This authentication flow is a slight customization of the Open ID Connect (oAut
0
0
310
Jul ’17
Point of URLSessionConfiguration.httpCookieAcceptPolicy?
I came across the httpCookieAcceptPolicy on URLSessionConfiguration and assumed it would take precedence over the HTTPCookieStorage.cookieAcceptPolicy, being more narrowly-targeted (ie, just to sessions that use this configuration, and the tasks those sessions create).In fact, that seems not to be how it works. Consider the following playground:import Foundation import PlaygroundSupport func refuseCookiesRemote() { let configuration = URLSessionConfiguration.default configuration.httpCookieAcceptPolicy = .never // doesn't seem to matter! // configuration.httpShouldSetCookies = false // this actually matters guard let url = URL(string: https://www.httpbin.org/cookies/set?refusedcookie=true) else { return } let session = URLSession(configuration: configuration) let task = session.dataTask(with: url) { data, response, error in print (refuseCookiesRemote() got response) if let configCookies = configuration.httpCookieStorage { print (configuration's cookies: (configCookies.cookies(for: url) ?? []
Topic: UI Frameworks SubTopic: UIKit Tags:
0
0
429
Jul ’17
CORS problem with Safari, S3, and XMLHttpRequests withCredentials
PLATFORM AND VERSIONOS XOSX 10.12.5, Safari 10.1.1. We've tested on multiple machines (Safari 10.1.2 as well).DESCRIPTION OF PROBLEMWe're migrating from a single server to AWS and have had a number of issues with CORS. We have some users with proxies, and in order to fix our proxy CORS issues, we enabled cookie forwarding in CloudFront and added withCredentials=true to all of our XHR requests.Unfortunately, Safari does not like this (in fact, adding withCredentials=true seems to cause CORS issues even outside of the proxy).Origin [REDACTED] is not allowed by Access-Control-Allow-OriginFailed to load resource: Origin [REDACTED] is not allowed by Access-Control-Allow-OriginXMLHttpRequest cannot load [REDACTED, CDN] due to access control checks.Is there anything known about Safari, S3, and CORS issues that may help us here? Our CORS policy has the redacted origin above listed as an allowed origin, so I'm not sure what is happening here (or why withCredentials=true is causing a problem when we are outsid
2
0
8.1k
Jul ’17
Subscription status updates are received but have an empty body
I have been implementing the subscription status updates service that Apple started to offer recently following the specifications described here. I started receiving updates but the received requests are simply empty.This is a dump of the request captured by Symfony (PHP framework):SymfonyComponentHttpFoundationRequest Object ( [attributes] => SymfonyComponentHttpFoundationParameterBag Object ( [parameters:protected] => Array ( [_controller] => AcmeSubscriptionBundleControllerStatusUpdateController::postAction [_route] => acme_subscription_statusupdate [_route_params] => Array ( ) ) ) [request] => SymfonyComponentHttpFoundationParameterBag Object ( [parameters:protected] => Array ( ) ) [query] => SymfonyComponentHttpFoundationParameterBag Object ( [parameters:protected] => Array ( ) ) [server] => SymfonyComponentHttpFoundationServerBag Object ( [parameters:protected] => Array ( [REDIRECT_SCRIPT_URL] => /statusupdate [REDIRECT_SCRIPT_URI] => https://acme.com/statusupdate
1
0
789
Aug ’17
Reply to System Storage Full
I'm hitting this issue now as well.I filed a radar 33722518. This issue seems to only have become present on iOS 11 beta 4 for me.I've got an iPhone 7 Plus 128GB. System is reportedly taking up ~51GB. Deleting stuff does seem to help but after an hour or two it's back to full.Clearing Safari cookies and data did reduce it by about 2GB but that's since filled back up.Apple Support recommended erasing and restoring the phone from a backup in cases like this.There isn't enough room for a sysdiagnose to complete either.Does anyone know if Apple are requesting the installation of a specific profile for them to debug this issue further? They are yet to reply to my radar.
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’17
Why does Safari report "invalid cookie" while Chrome does not?
I had a tcl script running on my old G5 Mac Pro that went to finance.yahoo.com and retrieved historical data (as *.csv files) for a bunch of stocks and mutual funds. It stopped working recently, so I looked into debugging or upgrading the script.Using my Macbook Pro, running 10.12.3, I used Safari to go to finance.yahoo.com and interactively downloaded the *.csv for a single stock; it successfully put it in my Downloads folder. I control-clicked on Download Data button and copied the URL it was sending. It looked like this:https://query1.finance.yahoo.com/v7/finance/download/AAPL?period1=1500181594&period2=1502859994&interval=1d&events=history&crumb=XCLhZMKKbfaI found that pasting this URL into a different Safari tab also downloaded AAPL.csv to my Downloads folder. I thought I was good to go.I tried using the URL in my tcl script on the G5, and it failed.So I tried tcl on the MacBook Pro, and it failed.So then I tried making a Mac app using a WKWebView, and seeing what would happen if I intera
0
0
605
Aug ’17
Validate mail, already validated!
I claim that I paid the enrollment to the developer program and have the validated Apple ID emails for a long time.Whenever I try to download a beta, the site will refer me to the validation page of the mail.I emptied the browser cache and deleted cookies, I also tried it from another mac.Does anyone know how I can solve it?Thanks so much
1
0
11k
Aug ’17
Intro to App Development with Swift - Lesson 13
Dear all,I have recently started learning to code with the 'Intro to App Development with Swift' book available on the iBooks Store.I have a couple of questions as I am frequently stuck due to what is, in my opinion, a lack of clarity in the questions.Sometimes I manage to get around it after a couple of days of thinking and sometimes I just cannot (and often because there were errors in the playgrounds provided).Here are my questions:1) are there provided solutions for the 'Intro to App Development with Swift' curriculum? I know that something is available for the next step, 'App Development with Swift' but I need this first one, at least to be able, after 20-30 minutes of brain crunching, to go look at a hint to let my brain make the next step.2) if there are not, could somebody help me with Lesson 13? It is the 'QuestionAnswerer' playground, page 'Dealing with Cases'. It explained me this:let question = WHERE ARE THE COOKIES?let lowerQuestion = question.lowercased()lowerQuestion.hasPrefix(where)..
3
0
14k
Aug ’17