session-cookies

Authentication in .NET Web API using MVC FormsAuthentication

那年仲夏 提交于 2019-12-06 04:17:27
问题 We have a single page application using the AngularJS framework that needs to talk to a API implemented in .NET Web API on a different domain. The problem The API is implemented in .NET Web API. To authenticate a user for access to our API we implemented the MVC Single Page Application template. This uses FormsAuthentication to grant acccess to the API. We used Fiddler to debug. When we visited a controller on the API that required authentication directly in the browser we could confirm that

remove jsessionid in url

一个人想着一个人 提交于 2019-12-06 03:45:55
问题 I am facing a problem in jsf web application deployed in jetty web-server. When access application in browser, jsessionID is appended in the url. I want to remove it from there. Thanks in advance. 回答1: Set the org.mortbay.jetty.servlet.SessionURL parameter to none in either the application web.xml or the context configuration. See the Jetty jsessionId documentation. 回答2: You can do that by Setting Session Characteristics. Set the context parameter org.eclipse.jetty.servlet

Angular 5 - Cookie is set although (Set-Cookie) is in the response header

泪湿孤枕 提交于 2019-12-06 01:35:24
问题 For an Angular 5 app, I have an auth service that does a HTTP POST which returns the session cookie (CORS) as shown below in the code below: signIn(signInRequest: SignInRequest): Observable<SignInResponse> { let headers: Headers = new Headers(); headers.append('Content-Type','application/json'); return this.http .post("/login", {email: signInRequest._email,password:signInRequest._password}, { headers: headers, withCredentials: true }) .map(this.extractData) .catch(this.handleErrorObservable);

My cookies are only available on PHP pages they are set on, is this normal?

故事扮演 提交于 2019-12-06 01:30:06
问题 I cannot access cookies from any page other than the page they are set on. I looked at print_r($_COOKIE) on different pages and the only common variable between pages is the $_COOKIE['PHPSESSID'] . I am developing on a local XAMPP testing server. Is there a setting I should change on the PHP.ini or is this normal behavior for cookies? Sorry, I'm a little new to this stuff and I was under the impression cookies were accessible site wide. I am setting cookies like: setcookie("user", "Dave

What is the difference between a Cookie and Redis Session store?

北城余情 提交于 2019-12-06 00:43:52
问题 I want to share sessions among 2 applications on different nodes; however, I am confused what the difference is between Cookie and Redis session stores; e.g. a cookie session might look like this: rack.session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRiJFN2YxZDMxMGE5YTNhZjc2NGM1NDBk%0AMzdiODQ0MjcyMzk5MzAxY2YyYzdhNDMwOWVkMzhiNWVlMmY2N2QwYzExNg%3D%3D%0A--ec4ec7b5a807c806e02e2811f4a11d05877a7698 In Redis, a session-store, might look like this: rack:session

Session cookies and persistent cookies

99封情书 提交于 2019-12-06 00:28:56
As I know, session cookies are stored in the browser's process (in memory, not in hard disk). When user close the browser, this cookies are released, we can't get this cookies again. So this kind of cookies are used to save session id. Persistent cookies are saved on hard disk. They are alive until they are expired. Usually, we create this cookies by setting an expiration. So my doubt is that: If we set a cookie without an expiration time , this cookie will be treated as session cookie? It will be saved in the browser's process? A cookie with expiration time must be treated as persistent

Django session expires at browser close OR after time

血红的双手。 提交于 2019-12-05 23:12:16
问题 The Django documentation states: You can control whether the session framework uses browser-length sessions vs. persistent sessions with the SESSION_EXPIRE_AT_BROWSER_CLOSE setting. If SESSION_EXPIRE_AT_BROWSER_CLOSE is set to True, Django will use browser-length cookies -- cookies that expire as soon as the user closes his or her browser. Use this if you want people to have to log in every time they open a browser. This setting is a global default and can be overwritten at a per-session

Zend Framework - Internet Explorer - phpsessid cookie issue

馋奶兔 提交于 2019-12-05 20:03:06
I've created a Zend Framework Website App session intensive. It works great in Chrome and Firefox but it is not working in IE. The session resets every page in IE. Looking into the headers I find that IE browser is getting a different phpsessid cookie in every get or post within the same browser so the session is not working. In FF and Chrome the phpsessid cookie persists ok. Anyone knows why this can happend only in IE? I have this code in bootstrap.php: $generalSession = new Zend_Session_Namespace('MyNameHere'); $generalSession ->setExpirationSeconds(1000 * 60); I recover the session using:

Python - Using Cookies Successfully

时光毁灭记忆、已成空白 提交于 2019-12-05 19:26:43
When I would try facebook cookies to open a logged account on facebook... import urllib2, urllib, cookielib jar = cookielib.CookieJar() cookie = urllib2.HTTPCookieProcessor(jar) opener = urllib2.build_opener(cookie) data = urllib.urlencode({'email':'user@email.com','pass':'swagpassword','login':'Log+In'}) req = urllib2.Request('http://www.facebook.com/login.php') response = opener.open(req, data) cookie_header = response.headers.get("Set-Cookie") response = opener.open(req, data) #I open it twice on purpose if "Logout" in response.read(): print("Logged In") jar = cookielib.CookieJar() #new

What is the advantage of using Gorilla sessions custom backend?

余生长醉 提交于 2019-12-05 18:38:14
问题 I want to use Redis for session management. But I can't figure out what the advantage is of using Redis as a custom back-end for Gorilla sessions package over using it directly? link to the Gorilla session package: http://www.gorillatoolkit.org/pkg/sessions 回答1: Gorilla sessions provides a means to wire up a storage system for session management provided you adhere to the interface provided. Currently, they give you two stores out of the box. One is a FilesystemStore that adheres to the