I've been reading for more than three days about this and my head is totally messed up. I saw too much code.. Plaase help!
I have an application with a webview. In this webview I am logged in an account. So this means that when I get to the upload part I must use the webview session. I didn't understand very clear how to work with cookies. Also in the uploader I must set the Content-type and the Content-Disposition.
So my question is: Would you give me an example all this things? Getting the cookies, setting them to the http post request and setting the cookies so I can send the image. Thanks!
Related
My scenario is this: we point the user to a form where they fill in the data (3DSecure) and then POST, the website then POSTS the response to a callback URL - this response is what I want to capture. WebView.shouldInterceptRequest() can get the headers but not the content (Why, Google?). I tried this link and it can get the POST data that the user sends. Is there any way to use Javascript to catch the POST data being received to a callback of my choosing?
I saw this post from 5 years ago and the man resorted to POSTing the response back to a server and then getting the contents from the phone. This is far from ideal. Surely there's a newer solution?
shouldInterceptRequest() mentions that a response contains the "response information or null if the WebView should load the resource itself", how do I get it so that the WebView shouldn't load the resource itself? The source code seems to return null always.
I used this gentleman's library: https://github.com/LivotovLabs/3DSView
If one was looking to do this with something other than 3DSecure they could use it as a template.
I have an android application that uses a symfony based api. I have users that login through the phone, send requests to the server and then logout. The problem is that unless I delete the cookies in the android(which I am storing) the symfony server would not log out the user, despite the fact that the user goes to the logout route.
This is part of my security.yml file (And I have tried a lot of combinations with this file to no avail)
firewalls:
api:
anonymous: ~
provider: users
access_denied_url: /user/accessDenied
pattern: ^/api/user
form_login:
login_path: /api/user/login
success_handler: Authentication_Handler
failure_handler: Failure_Handler
check_path: /api/user/login_check
remember_me: false
logout:
path: /api/user/logoutuser
success_handler: logout_handler
target: /
I have also tried triggering controllers manually that call $this->get('session')->invalidate(); and or that redirect to the logout path(some results around the web suggested that was a good idea, but it did not work) It just seems that, whenever cookies exist, the symfony server just logs the user in, that seems like a security issue to me considering that I am saving the cookies into shared preferences on android. Please help
I believe I have located the problem. On logout the cookie headers are not sent, so the server has no idea whose session to invalidate. Making the android httpclient behave like a full fledged browser can be tricky...
I am trying to implement a Sample application in Android which gets the malware and phishing list from safe Browsing API and checks the authenticity of URL, this is client side method, but I am constantly getting 400 (Bad Request) as response code when I am trying to hit the URL.
Searched throughout the internet but couldn't get any sample working code.
Even on Developer's Guide page https://developers.google.com/safe-browsing/developers_guide_v2 it is not mentioned how to send the list name correctly in POST request for downloading or updating.
Please help me by providing the correct procedure of how to send list name (if code snippet can be posted, it would be great as I am new to Android.)
Check out that request should end with '\n'. It is common to ignore this. I hope it helps.
Currently I am working on payment integration for native android app after send the request it have given me post back url with some attributes as success/fail response. I can't understand that how can I get those post back url attributes values using WebView . If any one know,
Please suggest me some idea for that.
I creating an application that can teather the wifi and act as like a firewall to manage the sessions to their clients .
for example:
If i manage the clients http requests and response..after i authenticated the request ,then only the url has to be visible for them.otherwise it has to say page blocked.
In an Example provided by the google https://developers.google.com/analytics/devguides/collection/android/v2/sessions
It says it can manage sessions But I cant able to integrate it my project .Can anyone worked projects similar to this or anyone used analystics-api, help me to work on this
And how can i get the request page url from the user..
Try this example in your activity ..From this code you able manage your http requests and responses..session-handling-Exampe
Hope will help you..