cookies

Protractor: clear browsing data completely

偶尔善良 提交于 2020-01-01 10:29:42
问题 I'm looking for a way to completely delete all cookies, session/state cookies, storage, etc. using Protractor. Basically, I want to accomplish the same thing in Protractor as a user would by going to Settings -> Clear browsing data. browser.manage().deleteAllCookies() does not delete httpOnly cookies. And since JavaScript can't touch httpOnly cookies, I can't use JavaScript. I know I could restart the browser in Protractor, but prefer not to go this route. Any suggestions? 回答1: This answer by

Protractor: clear browsing data completely

那年仲夏 提交于 2020-01-01 10:28:12
问题 I'm looking for a way to completely delete all cookies, session/state cookies, storage, etc. using Protractor. Basically, I want to accomplish the same thing in Protractor as a user would by going to Settings -> Clear browsing data. browser.manage().deleteAllCookies() does not delete httpOnly cookies. And since JavaScript can't touch httpOnly cookies, I can't use JavaScript. I know I could restart the browser in Protractor, but prefer not to go this route. Any suggestions? 回答1: This answer by

ASP.Net Forms Authentication Logging out users after 10 minutes

旧城冷巷雨未停 提交于 2020-01-01 10:08:02
问题 I am having a really bad issue where no matter what I try, the user is being logged off after 10 minutes. I am using ASP.Net 2.0 running on IIS 6.0 on Server 2003 R2 Standard Edition running as a Virtual Server with all applicable updates and .Net 3.5 SP1. The client is Internet Explorer 7.0 Below are the web.config settings: <!-- Authentication Mode --> <authentication mode="Forms"> <forms name=".RecipeViewer" timeout="240" /> </authentication> Below is the code used to set the authorization

ASP.Net Forms Authentication Logging out users after 10 minutes

隐身守侯 提交于 2020-01-01 10:07:52
问题 I am having a really bad issue where no matter what I try, the user is being logged off after 10 minutes. I am using ASP.Net 2.0 running on IIS 6.0 on Server 2003 R2 Standard Edition running as a Virtual Server with all applicable updates and .Net 3.5 SP1. The client is Internet Explorer 7.0 Below are the web.config settings: <!-- Authentication Mode --> <authentication mode="Forms"> <forms name=".RecipeViewer" timeout="240" /> </authentication> Below is the code used to set the authorization

QT HTTP Post issue when server requires cookies

依然范特西╮ 提交于 2020-01-01 09:55:13
问题 I have been trying this whole day with no success. Please help in solving the issue. On googling I found many users had this issue but nowhere I could find a solution. I am trying to do HTTP post in QT C++ & I have already tried doing that in python (My question is not a python question, so Qt pros please help ).. I know, I am somewhere wrong in handling cookies and all, so please help. Please provide probable solutions. In python, code is clean and simple. I have stripped error handling and

Setup cookie.signed in Rails 5 controller integration tests

这一生的挚爱 提交于 2020-01-01 09:15:13
问题 Imagine the scenario that there is a controller integration test calls a controller method, in which cookie.signed is used for some integrity checking. Controller # app/controllers/foo_controller.rb def index entity = FooEntity.find_by_id(params[:id]) if entity.nil? raise ActionController::BadRequest, 'Could not find requested entity.' else @is_authorized = entity.token == cookies.signed[:token] if @is_authorized # Success! The path to be tested. else raise ActionController::BadRequest,

Can store hash in a cookie?

落花浮王杯 提交于 2020-01-01 08:43:38
问题 Anyone know if I can put a hash in the cookie? Something like this: cookies [: test] = {: top => 5,: middle => 3,: bottom => 1} Thanks 回答1: I woud look into serializing the hash to store it. Then deserialize it to retrieve it. When you serialize a hash, the result will be an encoded string. This string can be decoded to get the original object back. You could use YAML or JSON for this. Both are nicely supported in Ruby. A YAML example require "yaml" cookies[:test] = YAML::dump {a: 1, b: "2",

Asp.Net core “remember me” persistent cookie not works after deploy

我们两清 提交于 2020-01-01 08:33:49
问题 I've built an MVC Core (Framework) application and I use Identity to login. When I click "Remember me" option all is ok on my develop machine, but after deploy on server machine, "remember me" doesn't maintain login after 30 minutes. I tried to check if cookie expiry date is set and seems to be ok, also on server machine the cookie seems well set. You can see my cookies detail in following image: Can anyone help me to solve this issue? Thanks in advance for your reply :) EDIT: As required by

Asp.Net core “remember me” persistent cookie not works after deploy

随声附和 提交于 2020-01-01 08:33:30
问题 I've built an MVC Core (Framework) application and I use Identity to login. When I click "Remember me" option all is ok on my develop machine, but after deploy on server machine, "remember me" doesn't maintain login after 30 minutes. I tried to check if cookie expiry date is set and seems to be ok, also on server machine the cookie seems well set. You can see my cookies detail in following image: Can anyone help me to solve this issue? Thanks in advance for your reply :) EDIT: As required by

How do you prevent Retrofit from automatically following a 302

巧了我就是萌 提交于 2020-01-01 08:04:22
问题 I have an authentication call that i'm trying to make using Retrofit on Android. The call returns a 302 to either a success or failure page. The original 302 response brings back a session cookie needed to maintain authentication on success, however Retrofit is automatically handing the request off to the redirect url before I get a chance to consume the cookie. Is there a way to prevent following the redirect? Or is there a way to write a response handler on Retrofit that can add the