cookies

OWIN SignOut doesn't remove cookie

夙愿已清 提交于 2021-02-07 11:16:30
问题 I am using the OWIN middleware in an external Authentication Server that my applications authenticate to using OAuth Authorisation Code Grant flow. I can redirect to the Authentication Server, authenticate against an external provider (Google) and redirect back to my client application with a logged in user and Application Cookie set just fine, however when I try to sign out the cookie remains after I call the AuthenticationManager.SignOut method. My cookie options in Startup.Auth.cs are: var

Use Jest to test secure cookie value

烈酒焚心 提交于 2021-02-07 08:28:36
问题 Previously I had Jest code to test for the value of a non-secure cookie. It looked like this: expect(Cookie.get('myToken')).toBe('tokenvalue'); (the Cookie in this instance is using the js-cookie api) However, I tried to update how I set my cookie, and added the secure flag and set it to true . Jest no longer can see this cookie when the test runs. What's the best way to test it? I've looked at questions like Jest secure cookies? I've also tested the code and checked in a browser that the

Django Iframe Safari Fix

安稳与你 提交于 2021-02-07 05:28:05
问题 So based on information here Safari 3rd party cookie iframe trick no longer working? and here Missing cookies on iframe in safari 5.1.5 it's clear that old tricks wont work: from django.http import HttpResponse from django.conf import settings SESSION_COOKIE_NAME = getattr(settings, 'SESSION_COOKIE_NAME') class SafariIFrameFixMiddleware(object): """ Middleware fixes sessions with Safari browser in iframes Safari default security policy restricts cookie setting in first request in iframe

Use Firefox's localStorage inspector to edit cookies?

浪子不回头ぞ 提交于 2021-02-07 03:34:29
问题 I'm performing a security analysis of my website and want to see how modified session data will effect my code. I can use Firefox's native Storage tab (on the developer tools menu) to view the cookie I want to change, but I can't edit it. Does Firefox allow this out of the box or do I need a plugin? 回答1: This is not possible with the stock storage inspector as of Firefox 38. It is planned to implement that feature, though: https://bugzilla.mozilla.org/show_bug.cgi?id=1031192 You can use the

Javascript read session cookies only

一个人想着一个人 提交于 2021-02-07 03:29:18
问题 I am wondering if there is an existing trick to filter on the cookies. I need to get the session cookies only and to discard the other. The usual way to read cookies using Javascript is: document.cookie However this prints all the cookies, my goal here is to get the session cookies only. I know that unlike "normal" cookies a session cookie has an expiration date. Does anyone have a code sample to achieve this session cookies extraction? Best, Alexandre 回答1: A "session cookie" is a normal

Javascript read session cookies only

。_饼干妹妹 提交于 2021-02-07 03:23:20
问题 I am wondering if there is an existing trick to filter on the cookies. I need to get the session cookies only and to discard the other. The usual way to read cookies using Javascript is: document.cookie However this prints all the cookies, my goal here is to get the session cookies only. I know that unlike "normal" cookies a session cookie has an expiration date. Does anyone have a code sample to achieve this session cookies extraction? Best, Alexandre 回答1: A "session cookie" is a normal

How to create a secure login system using cookies and sessions?

走远了吗. 提交于 2021-02-06 12:56:30
问题 I have a mysql table with userid, usernames and passwords and if the given password matches with the given username I create 3 cookies: userid username userpassword (md5) - I create this because I recheck the password and the username from the cookies when the user saves important settings (without asking the user to complete forms). I'we heard that this is not secure and I should use a cookie only to store session id, and to store this data in sessions, but how would look the code for this?

How to create a secure login system using cookies and sessions?

倖福魔咒の 提交于 2021-02-06 12:55:07
问题 I have a mysql table with userid, usernames and passwords and if the given password matches with the given username I create 3 cookies: userid username userpassword (md5) - I create this because I recheck the password and the username from the cookies when the user saves important settings (without asking the user to complete forms). I'we heard that this is not secure and I should use a cookie only to store session id, and to store this data in sessions, but how would look the code for this?

How to achieve multi-login for webviews in Android?

倾然丶 夕夏残阳落幕 提交于 2021-02-06 12:44:31
问题 I want to make an app that allows users to log-in multiple accounts of same site using different webview. For example, I have 2 WebView. Each WebView will load the same site such as gmail.com. And user can log-in using separate account in separate WebView. But the problem I am facing is that the 2 WebView always log-in to same account . I've googled a lot, and here are some related titles, Facebook MultiLogin in Android Webview Using WebView for multi-page login to website and fetch data

How to achieve multi-login for webviews in Android?

你。 提交于 2021-02-06 12:43:16
问题 I want to make an app that allows users to log-in multiple accounts of same site using different webview. For example, I have 2 WebView. Each WebView will load the same site such as gmail.com. And user can log-in using separate account in separate WebView. But the problem I am facing is that the 2 WebView always log-in to same account . I've googled a lot, and here are some related titles, Facebook MultiLogin in Android Webview Using WebView for multi-page login to website and fetch data