Warung Bebas
Showing posts with label cookies. Show all posts
Showing posts with label cookies. Show all posts

Friday, May 13, 2016

ARC cookie exchange extension

Missing cookies?

Advanced REST Client is not able to read cookies set in Chrome browser. If you authenticated yourself in a Chrome tab cookies are not transferred automatically.

But not anymore!
Now you can install ARC cookie exchange extension and synchronise cookies between Chrome and ARC. All cookies instantly will be available for the app when you install the extension.

How to use it?
First, install the extension:
Install ARC cookie exchange


Then open the app and use it. You won't see it working.
You can now authorise yourself in the regular chrome tab and then make authenticated request to the endpoint. All cookies with matched domain will be applied to the request automatically.
To stop cookie synchronisation and prevent them to be send with request just disable or remove the extension.

Is it safe?
Only Advanced REST Client (stable, beta, dev and canary) app is whitelisted to communicate with the extension. Other extensions or apps won't get any information about your cookies.

Permissions
Naturally the extension will ask you for permission to access cookies. Access to cookies is per domain so the extension must have access to all domains. This is why you will see permission dialog to access your data on all websites.


Image source: https://www.flickr.com/photos/nonprofitorgs/10174117234
License: https://creativecommons.org/licenses/by/2.0/

The image has been edited by the author of the app:
* removed background
* removed "sesame street" sign

Tuesday, April 26, 2016

Session management aka cookies in Advanced REST Client

In recent update there is a new session management mechanism. After last big update some of you complained about lack of cookies support. The networking in Chrome apps is separated from Chrome. Therefore it wasn't possible (and still isn't) to use cookies set in Chrome tab.



However, the app is now equipped in it's own session management.


Cookie store works similar as browsers do. There might be some differences - mostly about when the cookie is deleted from the store - comparing to a browser but general idea and storing / compering / rejecting or accepting algorithms are the same as defined in the spec.

Now the Advanced REST Client will accept cookies from the remote server, save them in local database (if cookies match domain and path as described in the spec). It will send back this cookies to the server during next call where domain and path match the cookie.

You can obtain a session cookie from the login form (for example) and use this cookie automatically while testing the API. It won't work, however, with cookies set in chrome tab.
Chrome apps don't have and most probably will never have access to browser's cookie storage (or any browser data). As the author I can't do much about it since it's a Chromium team design decision.

Note: Cookies are saved locally on your computer in the app's database. It means that other apps do not have access to it. You can be sure that session cookies can't leak outside the app because of the cookie store.
Be aware however that the exported file with request data will include "Set-Cookie" headers if there was any in exported requests.

Leave a comment if you have an idea of how to improve the app!
 

BLOG URANG BUNGAS Copyright © 2012 Fast Loading -- Powered by Blogger